examples/udhcp/simple.script: up interface on deconfig event
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 5 Sep 2019 12:58:08 +0000 (14:58 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 5 Sep 2019 12:58:30 +0000 (14:58 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
examples/udhcp/simple.script

index 53974e6d691773116c81d1794b6ad3c3c480b668..29199aa3956e326197f127fbf4eae6473bfda373 100755 (executable)
@@ -16,9 +16,10 @@ BROADCAST="broadcast +"
 
 case "$1" in
        deconfig)
-               echo "Setting IP address 0.0.0.0 on $interface"
+               echo "Clearing IP addresses on $interface, upping it"
                if command -v ip >/dev/null; then
                        ip addr flush dev $interface
+                       ip link set dev $interface up
                else
                        ifconfig $interface 0.0.0.0
                fi