summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorrink <rink@FreeBSD.org>2009-08-16 10:11:33 +0000
committerrink <rink@FreeBSD.org>2009-08-16 10:11:33 +0000
commitb4deaa79448cabef0b0928c695ef20fb95a034d6 (patch)
treeab9e13f6a9ca449a88535edefade2403fea6e711 /usr.sbin/sysinstall
parent6d86429b0a7a9566111f9e3ac9c6d76d969de452 (diff)
downloadFreeBSD-src-b4deaa79448cabef0b0928c695ef20fb95a034d6.zip
FreeBSD-src-b4deaa79448cabef0b0928c695ef20fb95a034d6.tar.gz
Prevent sysinstall from needlessly waiting for confirmation when using an USB
device in non-interactive mode. If there are no USB devices, sysinstall gives an error messages, and if there is >1, it'll ask which one is to be used. This change allows a non-interactive install from USB media to succeed without any user interaction if there is exactly one USB disk device in the system it can use. Submitted by: Daniel O'Connor < doconnorat gsoft dot com dot au > Reviewed by: randi Approved by: re (rwatson)
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/media.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index e50b47c..b325323 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -262,7 +262,8 @@ mediaSetUSB(dialogMenuItem *self)
mediaDevice = devs[0];
if (mediaDevice)
mediaDevice->private = NULL;
- msgConfirm("Using USB device: %s", mediaDevice->name);
+ if (!variable_get(VAR_NONINTERACTIVE))
+ msgConfirm("Using USB device: %s", mediaDevice->name);
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE);
}
OpenPOWER on IntegriCloud