forked from Ivasoft/openwrt
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user