diff options
Diffstat (limited to 'netconfig')
-rw-r--r-- | netconfig | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -544,11 +544,6 @@ else else VLAN="$(cat $TMP/reply)" echo "$VLAN" >$TMP/SeTVLAN - if [ "$VLAN" = "" ]; then - unset VLAN - rm -f $TMP/SeTVLAN - break - fi if [[ ! "$VLAN" =~ ^[0-9]+$ ]]; then dialog --title "VLAN ID" --ok-button "Back" --msgbox \ "That doesn't appear to be a valid VLAN ID." 5 46 @@ -566,7 +561,7 @@ else fi dialog --title "CONFIGURATION TYPE FOR '$HOSTNM.$DOMAIN'" \ ---default-item NetworkManager \ +--default-item NetworkManager --cancel-button "Exit" \ --menu \ "Now we need to know how your machine connects to the network.\n\ If you have an internal network card and an assigned IP address, gateway, \ @@ -590,7 +585,8 @@ REPLY=`cat $TMP/reply` rm -f $TMP/reply if [ "$REPLY" = "DHCP" ]; then - dialog --title "SELECT DHCP TYPE" --default-item "DHCPv4" --menu \ + dialog --title "SELECT DHCP TYPE" --default-item "DHCPv4" \ + --cancel-button "Exit" --menu \ "Please select the type of DHCP to use to configure your networking. Select 'DHCPv4' to configure for an IPv4 network (this is the most common type of network, and the safe choice). Select 'DHCPv6' for a @@ -616,15 +612,17 @@ pure IPv6 network, or 'Both' to try and set up both types of network." 13 73 3 \ that the DHCP hostname be set in order to connect. If so, they'll have assigned \ a hostname to your machine, which may look something like CC-NUMBER-A (this \ depends on your ISP). If you were assigned a DHCP hostname, please enter it \ -below. If you do not have a DHCP hostname, just leave it blank or select 'Skip'." 13 62 \ +below. If you do not have a DHCP hostname, just leave it blank or select 'Skip'." 13 67 \ 2> $TMP/SeTDHCPHOST - if [ "$?" = "255" ]; then + ERRNO="$?" + if [ "$ERRNO" = "255" ]; then + rm -f $TMP/SeTDHCPHOST exit + elif [ "$ERRNO" = "0" ]; then + # OK, if we actually got something, use it. + DHCP_HOSTNAME="$(cat $TMP/SeTDHCPHOST)" fi - NEW_DHCPHOST="`cat $TMP/SeTDHCPHOST`" rm -f $TMP/SeTDHCPHOST - # OK, if we actually got something, use it. - DHCP_HOSTNAME="$NEW_DHCPHOST" elif [ "$REPLY" = "loopback" ]; then LOOPBACK="yes" elif [ "$REPLY" = "NetworkManager" ]; then |