apk: /etc/apk/interactive enables interactive mode for tty sessions
In case someone prefers extra quesions while running apk in a terminal. The file is always from the real root; not from --root so that we will not accidentally enable interactive mode when in initramfs bootstrap.cute-signatures
parent
ba3ee3f863
commit
92d6e99144
|
@ -255,8 +255,11 @@ static void on_sigwinch(int s)
|
|||
static void setup_terminal(void)
|
||||
{
|
||||
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
||||
if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && isatty(STDIN_FILENO))
|
||||
if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && isatty(STDIN_FILENO)) {
|
||||
apk_flags |= APK_PROGRESS;
|
||||
if (access("/etc/apk/interactive", F_OK) == 0)
|
||||
apk_flags |= APK_INTERACTIVE;
|
||||
}
|
||||
signal(SIGWINCH, on_sigwinch);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue