35 lines
836 B
Plaintext
35 lines
836 B
Plaintext
|
description "Setup all configured Network Interfaces"
|
||
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||
|
version 1.0
|
||
|
emits none special
|
||
|
|
||
|
start on ( runlevel [2345] and (stopped maccfg))
|
||
|
|
||
|
console output
|
||
|
|
||
|
script
|
||
|
echo "Configuring network"
|
||
|
for IF in `ls -d /sys/class/net/*[^lo]`; do
|
||
|
DEVNAME=`basename $IF`
|
||
|
/sbin/if_up $DEVNAME
|
||
|
done
|
||
|
end script
|
||
|
|
||
|
post-start script
|
||
|
if [ ! -f /var/run/net_up ] && [ -f /etc/nsswitch.default ]; then
|
||
|
cp /etc/nsswitch.files /etc/nsswitch.conf
|
||
|
touch /var/state/ldap_disable
|
||
|
else
|
||
|
if [ ! -f /var/run/nsswitch_done ] && [ -f /etc/nsswitch.default ]; then
|
||
|
cp /etc/nsswitch.default /etc/nsswitch.conf
|
||
|
touch /var/state/ldap_disable
|
||
|
fi
|
||
|
if [ -f /var/run/net_up ]; then
|
||
|
rm /var/run/net_up
|
||
|
fi
|
||
|
if [ -f /var/run/nsswitch.done ]; then
|
||
|
rm /var/run/nsswitch.done
|
||
|
fi
|
||
|
fi
|
||
|
end script
|