3 # udevd does clearenv(). Export shell PATH to children.
6 # Do not run when pcmcia-cs is installed
7 test -x /sbin/cardctl && exit 0
9 # We get two "add" events for hostap cards due to wifi0
10 echo "$INTERFACE" | grep -q wifi && exit 0
13 # Check if /etc/init.d/network has been run yet to see if we are
14 # called by starting /etc/rcS.d/S03udev and not by hotplugging a device
16 # At this stage, network interfaces should not be brought up
17 # automatically because:
18 # a) /etc/init.d/network has not been run yet (security issue)
19 # b) /var has not been populated yet so /etc/resolv,conf points to
20 # oblivion, making the network unusable
23 spoofp="`grep ^spoofprotect /etc/network/options`"
26 # This is the default from /etc/init.d/network
29 spoofp_val=${spoofp#spoofprotect=}
32 test "$spoofp_val" = yes && spoofp_val=1 || spoofp_val=0
34 # I think it is safe to assume that "lo" will always be there ;)
35 if test "`cat /proc/sys/net/ipv4/conf/lo/rp_filter`" != "$spoofp_val" -a -n "$spoofp_val"
37 echo "$INTERFACE" >> /dev/udev_network_queue
42 # Code taken from pcmcia-cs:/etc/pcmcia/network
45 # if this interface has an entry in /etc/network/interfaces, let ifupdown
47 if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then
50 ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE