2010-04-20 12:58:29 +00:00
|
|
|
description "Setup all configured Network Interfaces"
|
|
|
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
|
|
|
version 1.0
|
|
|
|
emits none special
|
2008-05-03 17:03:02 +00:00
|
|
|
|
2010-04-20 12:58:29 +00:00
|
|
|
start on ( runlevel [2345] and (stopped maccfg))
|
2008-05-03 17:03:02 +00:00
|
|
|
|
2010-04-20 12:58:29 +00:00
|
|
|
console output
|
2010-01-28 13:58:15 +00:00
|
|
|
|
|
|
|
script
|
2010-04-20 12:58:29 +00:00
|
|
|
echo "Configuring network"
|
|
|
|
for IF in `ls -d /sys/class/net/*[^lo]`; do
|
2010-01-28 13:58:15 +00:00
|
|
|
DEVNAME=`basename $IF`
|
2010-04-20 12:58:29 +00:00
|
|
|
/sbin/if_up $DEVNAME
|
2008-05-03 17:03:02 +00:00
|
|
|
done
|
|
|
|
end script
|
|
|
|
|
2010-01-28 13:58:15 +00:00
|
|
|
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
|