diff options
Diffstat (limited to 'package/base-files/files')
-rw-r--r-- | package/base-files/files/etc/iproute2/rt_tables | 11 | ||||
-rw-r--r-- | package/base-files/files/lib/preinit/10_indicate_preinit | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/package/base-files/files/etc/iproute2/rt_tables b/package/base-files/files/etc/iproute2/rt_tables new file mode 100644 index 0000000000..541abfd272 --- /dev/null +++ b/package/base-files/files/etc/iproute2/rt_tables @@ -0,0 +1,11 @@ +# +# reserved values +# +255 local +254 main +253 default +0 unspec +# +# local +# +#1 inr.ruhep diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index 8e94df9ab2..1fab8a20ad 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -10,13 +10,15 @@ preinit_ip() { fi [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { - ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up + ip link set dev $pi_ifname up + ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $pi_ifname } } preinit_ip_deconfig() { [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { - ifconfig $pi_ifname 0.0.0.0 down + ip -4 address flush dev $pi_ifname + ip link set dev $pi_ifname down } } |