diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-30 17:25:21 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-08-03 10:42:35 +0200 |
commit | 50413e1ec83dedaea44558d5f37af5454156a46a (patch) | |
tree | a80358842c8ef3e9fd7fb9038ff46d3ab45f5ab9 /package/network/config/netifd/files/usr | |
parent | 356866c481cf74e87b9025ebbfdef0995674dca3 (diff) | |
download | upstream-50413e1ec83dedaea44558d5f37af5454156a46a.tar.gz upstream-50413e1ec83dedaea44558d5f37af5454156a46a.tar.bz2 upstream-50413e1ec83dedaea44558d5f37af5454156a46a.zip |
package: replace remaining occurrences of ifconfig with ip
ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for packages by the
corresponding ip commands now.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/network/config/netifd/files/usr')
-rwxr-xr-x | package/network/config/netifd/files/usr/share/udhcpc/default.script | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/network/config/netifd/files/usr/share/udhcpc/default.script b/package/network/config/netifd/files/usr/share/udhcpc/default.script index ac765a6363..0a9eb0180e 100755 --- a/package/network/config/netifd/files/usr/share/udhcpc/default.script +++ b/package/network/config/netifd/files/usr/share/udhcpc/default.script @@ -14,8 +14,8 @@ set_classless_routes() { } setup_interface() { - echo "udhcpc: ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast ${broadcast:-+}" - ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast ${broadcast:-+} + echo "udhcpc: ip addr add $ip/${subnet:-255.255.255.0} broadcast ${broadcast:-+} dev $interface" + ip addr add $ip/${subnet:-255.255.255.0} broadcast ${broadcast:-+} dev $interface [ -n "$router" ] && [ "$router" != "0.0.0.0" ] && [ "$router" != "255.255.255.255" ] && { echo "udhcpc: setting default routers: $router" @@ -41,7 +41,7 @@ setup_interface() { applied= case "$1" in deconfig) - ifconfig "$interface" 0.0.0.0 + ip -4 addr flush dev "$interface" ;; renew) setup_interface update |