db23a575d9
Ausserdem die Prozesserkennung präzisiert. git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_autofs@5834 504e572c-2e33-0410-9681-be2bf7408885
32 lines
800 B
Plaintext
32 lines
800 B
Plaintext
description "Startup autofs System for nis configuration files"
|
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
|
version 1.0
|
|
emits none special
|
|
|
|
start on ( runlevel [2345] and ( started ypclient ))
|
|
stop on stopping ypclient
|
|
|
|
console output
|
|
|
|
pre-start script
|
|
source /etc/init/functions
|
|
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
|
if [ -f /var/run/autofs/automount_nis.pid ]; then
|
|
if ps -ef|\
|
|
grep automount |\
|
|
grep nis |\
|
|
awk '{print $2}'|\
|
|
grep -q `cat /var/run/autofs/automount_nis.pid`; then
|
|
echo -n "Automount already running"
|
|
exit 10
|
|
else
|
|
rm /var/run/autofs/automount_nis.pid
|
|
fi
|
|
fi
|
|
else
|
|
exit 10
|
|
fi
|
|
end script
|
|
|
|
exec automount -f -C -p /var/run/autofs/automount_nis.pid -t `cat /etc/sysconfig/autofstime` nis:auto.master
|