diff options
-rw-r--r-- | usr.sbin/sade/msg.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/media.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/msg.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index 256346e..d54c652 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/msg.c @@ -237,6 +237,8 @@ msgYesNo(char *fmt, ...) ioctl(0, VT_ACTIVATE, 1); /* Switch back */ msgInfo(NULL); } + if (variable_get(VAR_NONINTERACTIVE)) + return 1; /* If non-interactive, return YES all the time */ ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; @@ -261,6 +263,8 @@ msgNoYes(char *fmt, ...) ioctl(0, VT_ACTIVATE, 1); /* Switch back */ msgInfo(NULL); } + if (variable_get(VAR_NONINTERACTIVE)) + return 0; /* If non-interactive, return NO all the time */ ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c index 789d0a6..c5216e2 100644 --- a/usr.sbin/sysinstall/media.c +++ b/usr.sbin/sysinstall/media.c @@ -323,10 +323,8 @@ mediaSetFTP(dialogMenuItem *self) mediaClose(); cp = variable_get(VAR_FTP_PATH); /* If we've been through here before ... */ - if (!variable_get(VAR_NONINTERACTIVE)) - if (networkDev && cp && msgYesNo("Re-use old FTP site selection values?")) - cp = NULL; - + if (networkDev && cp && msgYesNo("Re-use old FTP site selection values?")) + cp = NULL; if (!cp) { if (!dmenuOpenSimple(&MenuMediaFTP, FALSE)) return DITEM_FAILURE; diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index 256346e..d54c652 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -237,6 +237,8 @@ msgYesNo(char *fmt, ...) ioctl(0, VT_ACTIVATE, 1); /* Switch back */ msgInfo(NULL); } + if (variable_get(VAR_NONINTERACTIVE)) + return 1; /* If non-interactive, return YES all the time */ ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; @@ -261,6 +263,8 @@ msgNoYes(char *fmt, ...) ioctl(0, VT_ACTIVATE, 1); /* Switch back */ msgInfo(NULL); } + if (variable_get(VAR_NONINTERACTIVE)) + return 0; /* If non-interactive, return NO all the time */ ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; |