diff options
-rw-r--r-- | netconfig | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -42,6 +42,13 @@ fi # ============================================================================= # IPv4 config information for eth0: +ENDFILE + +if [ -n "$VLAN" ]; then + echo "IFNAME[0]=\"eth0$VLAN\"" >>$RC +fi + +/bin/cat << ENDFILE >> $RC IPADDR[0]="$RCIPCOPY" NETMASK[0]="$RCMASKCOPY" IPALIASES[0]="" @@ -466,6 +473,29 @@ echo $HOSTNM.$DOMAIN > etc/HOSTNAME # sed -i "s/^hostname=.*$/hostname=$HOSTNM/g" etc/NetworkManager/NetworkManager.conf #fi +dialog --title "CONNECT VIA VLAN" --defaultno --yesno \ +"Some advanced networking set ups require a VLAN ID in order to \ +connect to the network. Do you wish to configure a VLAN now? \n\n\ +Unless you are sure you require a VLAN, select 'No'." 8 68 +if [ $? = 0 ]; then + while true; do + dialog --title "VLAN ID" --cancel-label "Skip" --inputbox \ + "Enter the VLAN ID used on this network." 8 45 2>$TMP/reply + if [ $? = 0 ]; then + if ! (($(cat $TMP/reply))) 2>/dev/null; then + dialog --title "VLAN ID" --ok-button "Back" --msgbox \ + "That doesn't appear to be a valid VLAN ID." 5 46 + continue + else + VLAN=".`cat $TMP/reply`" + break + fi + else + break + fi + done +fi + dialog --title "CONFIGURATION TYPE FOR '$HOSTNM.$DOMAIN'" \ --default-item NetworkManager \ --menu \ |