diff --git a/etc/init/yppasswdd.conf b/etc/init/yppasswdd.conf new file mode 100644 index 0000000..3d093fb --- /dev/null +++ b/etc/init/yppasswdd.conf @@ -0,0 +1,12 @@ +description "If configured, startup rpc.ypxfrd (slave yp server) prozess" +author "Harald Kueller " +version 1.0 +emits none special + +start on yppasswd +stop on stopping ypserv + +console none + +expect daemon +exec /usr/sbin/rpc.yppasswdd -D $PASSPATH diff --git a/etc/init/ypserv.conf b/etc/init/ypserv.conf new file mode 100644 index 0000000..407b109 --- /dev/null +++ b/etc/init/ypserv.conf @@ -0,0 +1,24 @@ +description "If configured, startup ypserver prozess" +author "Harald Kueller " +version 1.0 +emits none special + +start on ( runlevel [2345] and (started rpc)) +stop on stopping rpc + +console none + +pre-start script + if [ -f /etc/sysconfig/nis/defaultdomain ]; then + domainname `cat /etc/sysconfig/nis/defaultdomain` + else + exit 10 + fi +end script + +expect daemon +exec /usr/sbin/ypserv + +post-start script + initctl emit yppasswd PASSPATH=/etc/sysconfig/nis/`domainname` +end script diff --git a/etc/init/ypxfrd.conf b/etc/init/ypxfrd.conf new file mode 100644 index 0000000..2b15d2a --- /dev/null +++ b/etc/init/ypxfrd.conf @@ -0,0 +1,12 @@ +description "If configured, startup rpc.ypxfrd (slave yp server) prozess" +author "Harald Kueller " +version 1.0 +emits none special + +start on started ypserv +stop on stopping ypserv + +console none + +expect daemon +exec /usr/sbin/rpc.ypxfrd diff --git a/init/genpkg b/init/genpkg index 8db5ea0..d3aeeb7 100644 --- a/init/genpkg +++ b/init/genpkg @@ -19,18 +19,20 @@ # # -WDIR=`pwd` -mkdir etc/init.d/rc{0,1,2,3,4,5,6}.d -cd etc/init.d -chmod 755 ypserver -for i in 0 1 2 6; do - cd rc$i.d - ln -s ../ypserver K86ypserver - cd .. -done -for i in 3 4 5; do - cd rc$i.d - ln -s ../ypserver S12ypserver - cd .. -done -cd $WDIR +if [ -d /var/install/sysvinit* ]; then + WDIR=`pwd` + mkdir etc/init.d/rc{0,1,2,3,4,5,6}.d + cd etc/init.d + chmod 755 ypserver + for i in 0 1 2 6; do + cd rc$i.d + ln -s ../ypserver K86ypserver + cd .. + done + for i in 3 4 5; do + cd rc$i.d + ln -s ../ypserver S12ypserver + cd .. + done + cd $WDIR +fi