Viitor_autofs/etc/init/autofs.conf
kueller db23a575d9 Der Check ob automount in /etc/nsswitch.conf vorhanden ist funktioniert wieder.
Ausserdem die Prozesserkennung präzisiert.



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_autofs@5834 504e572c-2e33-0410-9681-be2bf7408885
2010-10-10 13:48:05 +00:00

33 lines
894 B
Plaintext

description "Startup autofs System for local configuration files"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on (runlevel [2345] and (started mountfs))
stop on runlevel [016]
console none
pre-start script
source /etc/init/functions
if [ -f /etc/sysconfig/auto.master ] && grep automount /etc/nsswitch.conf|grep -q files; then
if [ -f /var/run/autofs/automount_files.pid ]; then
if ps -ef|\
grep automount |\
grep nis |\
awk '{print $2}'|\
grep -q `cat /var/run/autofs/automount_files.pid`; then
echo "Automount already running - not started"
exit 10
else
echo -n "Removing old files"
rm /var/run/autofs/automount_files.pid
fi
fi
else
exit 10
fi
end script
exec automount -f -p /var/run/autofs/automount_files.pid -t `cat /etc/sysconfig/autofstime` /etc/sysconfig/auto.master