diff options
author | Karel Kočí <cynerd@email.cz> | 2020-05-29 11:19:21 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2020-05-29 11:19:21 +0200 |
commit | 3d78a068cbe7ce0eccf65491aef2d235d31fae99 (patch) | |
tree | f4582f92497b985ea812fca9802feee7ecfcd8ed /netifd/files/usr/share | |
parent | c606e009f2639c6b0518c9ad2bdf2b77c35ca6e5 (diff) | |
download | openwrt-personal-pkgs-3d78a068cbe7ce0eccf65491aef2d235d31fae99.tar.gz openwrt-personal-pkgs-3d78a068cbe7ce0eccf65491aef2d235d31fae99.tar.bz2 openwrt-personal-pkgs-3d78a068cbe7ce0eccf65491aef2d235d31fae99.zip |
netifd: drop
Diffstat (limited to 'netifd/files/usr/share')
-rwxr-xr-x | netifd/files/usr/share/udhcpc/default.script | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/netifd/files/usr/share/udhcpc/default.script b/netifd/files/usr/share/udhcpc/default.script deleted file mode 100755 index ac765a6..0000000 --- a/netifd/files/usr/share/udhcpc/default.script +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 - -set_classless_routes() { - local max=128 - local type - while [ -n "$1" -a -n "$2" -a $max -gt 0 ]; do - [ ${1##*/} -eq 32 ] && type=host || type=net - echo "udhcpc: adding route for $type $1 via $2" - route add -$type "$1" gw "$2" dev "$interface" - max=$(($max-1)) - shift 2 - done -} - -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:-+} - - [ -n "$router" ] && [ "$router" != "0.0.0.0" ] && [ "$router" != "255.255.255.255" ] && { - echo "udhcpc: setting default routers: $router" - - local valid_gw="" - for i in $router ; do - route add default gw $i dev $interface - valid_gw="${valid_gw:+$valid_gw|}$i" - done - - eval $(route -n | awk ' - /^0.0.0.0\W{9}('$valid_gw')\W/ {next} - /^0.0.0.0/ {print "route del -net "$1" gw "$2";"} - ') - } - - # CIDR STATIC ROUTES (rfc3442) - [ -n "$staticroutes" ] && set_classless_routes $staticroutes - [ -n "$msstaticroutes" ] && set_classless_routes $msstaticroutes -} - - -applied= -case "$1" in - deconfig) - ifconfig "$interface" 0.0.0.0 - ;; - renew) - setup_interface update - ;; - bound) - setup_interface ifup - ;; -esac - -# user rules -[ -f /etc/udhcpc.user ] && . /etc/udhcpc.user - -exit 0 |