Skip to content

Commit

Permalink
package: replace remaining occurrences of ifconfig with ip
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
adschm committed Aug 3, 2020
1 parent 356866c commit 50413e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ start_interface() {
append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N"
done
append ${prefix}q "$(tcrules)" "$N"
export dev_${dir}="ifconfig $dev up >&- 2>&-
export dev_${dir}="ip link set $dev up >&- 2>&-
tc qdisc del dev $dev root >&- 2>&-
tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0
tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit"
Expand Down

0 comments on commit 50413e1

Please sign in to comment.