examples/udhcp/simple.script: up interface on deconfig event

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2019-09-05 14:58:08 +02:00
parent 35e349de3c
commit 81a708393d

View File

@ -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