X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sbin%2Fnetcardconfig;h=3a8036621a080c76da3d60c4744ebc10fb5cbe18;hb=0129d4078b03e9f0919ad24368c4e88189b9702c;hp=d85404f6ed7d23d2272224a905e717fd63e368e0;hpb=597006195c1c3d6336fd71c36d27b605ea569f81;p=grml-network.git diff --git a/sbin/netcardconfig b/sbin/netcardconfig index d85404f..3a80366 100755 --- a/sbin/netcardconfig +++ b/sbin/netcardconfig @@ -56,7 +56,7 @@ writeiwline() { for mod in /sys/module/rt2??0/ ; do if [ -d "$mod" ]; then - IWPREUPLINE="$IWPREUPLINE pre-up /sbin/ifconfig $DV up\n" + IWPREUPLINE="$IWPREUPLINE pre-up /sbin/ip link set $DV up\n" break fi done @@ -93,7 +93,7 @@ generate_udev_entry() { # Executing this script generates an entry in /etc/udev/rules.d/z25_persistent-net.rules # for you, please check z25_persistent-net.rules for existing entries before # running this script (once more)." > /etc/udev/scripts/netcardconfig - for interface in $(ifconfig | awk '/^[a-z]/ &&!/^lo/{ print $1} ') ; do + for interface in $(ip -oneline link | awk '!/ lo: / {print $2}' | sed 's/:$//; s/@.*//') ; do echo -n "INTERFACE=$interface /lib/udev/write_net_rules " >> /etc/udev/scripts/netcardconfig && \ if which udevadm >/dev/null 2>&1; then udevadm info -a -p "/sys/class/net/$interface" | awk -F'==' '/address/ {print $2}' >> /etc/udev/scripts/netcardconfig @@ -158,7 +158,7 @@ remauto(){ scanwlan(){ i=0 - ifconfig "$DV" up + ip link set "$DV" up iwlist "$DV" scanning | grep "ESSID\|Quality" | sed -e "s/^.*ESSID:\"\|\"$//g" | tac > "$TMP" while read -r line do @@ -420,10 +420,11 @@ configiface() { fi # Configure VLAN on this interface? - if $DIALOG --yesno "$MESSAGE16" 8 45; then + if $DIALOG --defaultno --yesno "$MESSAGE16" 8 45; then $DIALOG --inputbox "$MESSAGE17 $DV" 10 45 2>"$TMP" || bailout 1 read -r VLAN <"$TMP" ; rm -f "$TMP" if [ -n "$VLAN" ]; then + modprobe 8021q # avoid warning that VLAN support isn't present yet PDV=$DV DV="vlan$VLAN" fi