1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

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)
This commit is contained in:
Rink Springer 2009-08-16 10:11:33 +00:00
parent 538e86713d
commit ab1a777e91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196272

View File

@ -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);
}