Viitor_upstart/etc/init/ifup.conf
kueller 9df088532e Neue erst versionen für den einsatz von upstart als std init prozess
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5506 504e572c-2e33-0410-9681-be2bf7408885
2010-04-20 12:58:29 +00:00

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