Viitor_upstartaddon/etc/event.d/autofs-nis

18 lines
370 B
Plaintext
Raw Normal View History

start on started ypclient
stop on stopping ypclient
console output
pre-start script
source /etc/init.d/functions
if grep automount /etc/nsswitch.conf 2>/dev/null|\
grep nis &>/dev/null; then
ypcat -k auto.master|initautomount nis yp >>/tmp/autofs.log
fi
end script
post-stop script
kill `ps -ef|grep automount|grep yp|awk '{print $2}'`
end script