diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-10-25 16:35:48 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-10-25 16:35:48 +0000 |
commit | 42dab25a22b51e2f6352c24210a39ea37ecee0fe (patch) | |
tree | 760a4cd7918534551e7465a6d11af1030692179d /usr.sbin/bsdinstall/scripts | |
parent | 955d2b5af8740fe3af16a47e773773f03e52cdde (diff) | |
download | FreeBSD-src-42dab25a22b51e2f6352c24210a39ea37ecee0fe.zip FreeBSD-src-42dab25a22b51e2f6352c24210a39ea37ecee0fe.tar.gz |
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
Diffstat (limited to 'usr.sbin/bsdinstall/scripts')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/netconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index e0f390c..382ff2c 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -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 |