2010-04-20 14:01:45 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
script
|
|
|
|
source /etc/init/functions
|
|
|
|
source /etc/sysconfig/autofstime
|
|
|
|
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
2010-04-27 20:34:58 +00:00
|
|
|
if [ -f /var/run/autofs/automount_nis.pid ]; then
|
2010-04-20 14:01:45 +00:00
|
|
|
if ps -ef|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
|
2010-07-09 16:20:19 +00:00
|
|
|
automount -f -C -p /var/run/autofs/automount_nis.pid -t $TIMEOUT nis:auto.master
|
2010-04-20 14:01:45 +00:00
|
|
|
fi
|
|
|
|
end script
|