2010-04-20 15:17:37 +00:00
|
|
|
description "If configured, startup ypbind prozess"
|
|
|
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
|
|
|
version 1.0
|
|
|
|
emits none special
|
|
|
|
|
|
|
|
start on ( runlevel [2345] and (started rpc))
|
|
|
|
stop on stopping rpc
|
|
|
|
|
|
|
|
console none
|
2010-04-21 12:53:37 +00:00
|
|
|
|
|
|
|
pre-start script
|
2010-04-27 20:35:45 +00:00
|
|
|
if [ ! -d /etc/sysconfig/nis ]; then
|
|
|
|
mkdir /etc/sysconfig/nis
|
|
|
|
fi
|
2010-04-20 15:17:37 +00:00
|
|
|
if [ -f /etc/sysconfig/nis/defaultdomain ]; then
|
|
|
|
domainname `cat /etc/sysconfig/nis/defaultdomain`
|
2010-04-21 12:53:37 +00:00
|
|
|
else
|
|
|
|
exit 10
|
2010-04-20 15:17:37 +00:00
|
|
|
fi
|
2010-08-19 19:25:52 +00:00
|
|
|
if [ -f /etc/yp.conf ]; then
|
|
|
|
echo "" >/tmp/yp_options
|
|
|
|
else
|
|
|
|
echo "-broadcast" >/tmp/yp_options
|
|
|
|
fi
|
2010-04-20 15:17:37 +00:00
|
|
|
end script
|
2010-04-21 12:53:37 +00:00
|
|
|
|
|
|
|
expect daemon
|
2010-08-19 19:25:52 +00:00
|
|
|
exec /usr/sbin/ypbind `cat /tmp/yp_options`
|
|
|
|
|
|
|
|
post-start script
|
|
|
|
rm /tmp/yp_options
|
|
|
|
end script
|