DV=$DEVICENAME
ifdown "${DV}" --force
sleep 3
- # wireless config
- WLDEVICECOUNT="$(LANG=C LC_MESSAGEWS=C iwconfig "$DV" 2>/dev/null | wc -l)"
+ # INTERACTIVE=true
if "${INTERACTIVE}" ; then
+ # Setup wireless options?
if [ $iswireless -gt 0 ] && $DIALOG --yesno "$MESSAGE13" 8 45; then
+ WLDEVICECOUNT="$(LANG=C LC_MESSAGEWS=C iwconfig "$DV" 2>/dev/null | wc -l)"
ESSID=""
NWID=""
MODE=""
read -r IWPRIV <"$TMP" ; rm -f "$TMP"
writeiwline
- fi
+ fi # Setup wireless options?
# Configure VLAN on this interface?
if $DIALOG --defaultno --yesno "$MESSAGE16" 8 45; then
DV="vlan$VLAN"
fi
fi
- fi
+ fi # INTERACTIVE=true
+ # Use DHCP broadcast?
if ("${INTERACTIVE}" && "${DIALOG}" --yesno "${MESSAGE2}" 8 45) || \
(! "${INTERACTIVE}" && [[ "${METHOD}" == 'dhcp' ]]) ; then
if [ -w /etc/network/interfaces ]; then
#addauto
fi
- fi
+ fi # Use DHCP broadcast?
echo "Done."
}