From dbaee4aae713410b813f871bb8e8594a9d84f814 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 20 Dec 2014 22:08:23 +0100 Subject: autowifi-merged files to recon/autowifi --- usr/lib/autowifi/opt/udhcpc.run | 70 ----------------------------------------- 1 file changed, 70 deletions(-) delete mode 100755 usr/lib/autowifi/opt/udhcpc.run (limited to 'usr/lib/autowifi/opt') diff --git a/usr/lib/autowifi/opt/udhcpc.run b/usr/lib/autowifi/opt/udhcpc.run deleted file mode 100755 index 2e1b919f..00000000 --- a/usr/lib/autowifi/opt/udhcpc.run +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -# shamelessly stolen from http://www.doit.org/udhcpc/S50default - -PATH=/bin:/usr/bin:/sbin:/usr/sbin - -RESOLV_CONF="/etc/resolv.conf" - -update_interface() -{ - [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" - [ -n "$subnet" ] && NETMASK="netmask $subnet" - ifconfig $interface $ip $BROADCAST $NETMASK -} - -update_routes() -{ - if [ -n "$router" ] - then - echo "deleting routes" - while route del default gw 0.0.0.0 dev $interface - do : - done - - for i in $router - do - route add default gw $i dev $interface - done - fi -} - -update_dns() -{ - echo -n > $RESOLV_CONF - [ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF - for i in $dns - do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF - done -} - -deconfig() -{ - ifconfig $interface 0.0.0.0 -} - -case "$1" in - bound) - update_interface; - update_routes; - update_dns; - ;; - - renew) - update_interface; - update_routes; - update_dns; - ;; - - deconfig) - deconfig; - ;; - - *) - echo "Usage: $0 {bound|renew|deconfig}" - exit 1 - ;; -esac - -exit 0 -- cgit v1.2.3