Changeset 15d8ea1 in freewrt for package


Ignore:
Timestamp:
Jul 17, 2006, 5:29:56 AM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
cf0d868
Parents:
82d2266
Message:

old default.script from whiterussian

git-svn-id: svn://www.freewrt.org/trunk/freewrt@272 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/default/usr/share/udhcpc/default.script

    r82d2266 r15d8ea1  
    11#!/bin/sh
    22[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
    3 . /etc/config/network
    43
    54RESOLV_CONF="/tmp/resolv.conf"
    65
    76hotplug_event() {
    8         for ifname in lan wan wifi ${ifnames}; do
    9                 eval "proto=\"\${${ifname}_proto}\""
    10                 eval "if=\"\${${ifname}_ifname}\""
    11                 [ "$proto" = "dhcp" ] || continue
    12                 [ "$if" = "$interface" ] || continue
    13                 env -i ACTION="$1" INTERFACE="$ifname" PROTO=dhcp /sbin/hotplug iface
    14         done
     7        nvram show 2>&- | grep _proto=dhcp | {
     8                while :; do
     9                        read FOO
     10                        [ -z "$FOO" ] && break
     11                        FOO="${FOO%%_*}"
     12                        [ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue
     13                        env -i ACTION="$1" INTERFACE="${FOO}" PROTO=dhcp /sbin/hotplug iface
     14                done
     15        }
    1516}
    1617
Note: See TracChangeset for help on using the changeset viewer.