Provide an error message and error handling if there are no network

interfaces in the system. This is a non-fatal error except when doing a
network installation.

PR:		bin/161950
MFC after:	3 days
This commit is contained in:
Nathan Whitehorn 2011-10-25 16:35:48 +00:00
parent 9c60ca3238
commit 41f2f866d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226741

View File

@ -49,6 +49,13 @@ for IF in `ifconfig -l`; do
DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\""
done
if [ -z "$INTERFACES" ]; then
dialog --backtitle 'FreeBSD Installer' \
--title 'Network Configuration Error' \
--msgbox 'No network interfaces present to configure.' 0 0
exit 1
fi
exec 3>&1
INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi