From d729624fb857af6031a293f097d7eebebe7cfb80 Mon Sep 17 00:00:00 2001 From: Adam Wujek Date: Wed, 8 Jul 2015 16:56:14 +0200 Subject: [PATCH] rootfs: again fix problems with setting static IP Hope this time it works. Problem was when dot-config set IP via dhcp then static. Signed-off-by: Adam Wujek --- userspace/rootfs_override/etc/init.d/network | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/userspace/rootfs_override/etc/init.d/network b/userspace/rootfs_override/etc/init.d/network index 528accd7..f9bc9c69 100755 --- a/userspace/rootfs_override/etc/init.d/network +++ b/userspace/rootfs_override/etc/init.d/network @@ -21,7 +21,11 @@ fi # kill all previous instances of udhcpc killall udhcpc &> /dev/null -# put eth0 down in case it was up before, flush to aviod ifup complains +# put eth0 down in case it was up before, but it is not so simple +# ifdown to change /var/run/ifstate +# flush to aviod ifup complains +# down to take link down (after reboot ifdown does not put link down) +ifdown eth0 &> /dev/null ip addr flush dev eth0 ip link set eth0 down # wait after down to make udhcpc to work properly -- 2.18.1