diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-09-05 14:58:08 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-09-05 14:58:30 +0200 |
commit | 81a708393d851b6b35c9bc3efe0e76ae696c07cc (patch) | |
tree | 356a442186125f2107ce629b8bbcbdebcabcd707 | |
parent | 35e349de3c93ab75abd8a990aaa1e01658273650 (diff) | |
download | busybox-w32-81a708393d851b6b35c9bc3efe0e76ae696c07cc.tar.gz busybox-w32-81a708393d851b6b35c9bc3efe0e76ae696c07cc.tar.bz2 busybox-w32-81a708393d851b6b35c9bc3efe0e76ae696c07cc.zip |
examples/udhcp/simple.script: up interface on deconfig event
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | examples/udhcp/simple.script | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script index 53974e6d6..29199aa39 100755 --- a/examples/udhcp/simple.script +++ b/examples/udhcp/simple.script | |||
@@ -16,9 +16,10 @@ BROADCAST="broadcast +" | |||
16 | 16 | ||
17 | case "$1" in | 17 | case "$1" in |
18 | deconfig) | 18 | deconfig) |
19 | echo "Setting IP address 0.0.0.0 on $interface" | 19 | echo "Clearing IP addresses on $interface, upping it" |
20 | if command -v ip >/dev/null; then | 20 | if command -v ip >/dev/null; then |
21 | ip addr flush dev $interface | 21 | ip addr flush dev $interface |
22 | ip link set dev $interface up | ||
22 | else | 23 | else |
23 | ifconfig $interface 0.0.0.0 | 24 | ifconfig $interface 0.0.0.0 |
24 | fi | 25 | fi |