]> git.draconx.ca Git - gentoo-draconx.git/blob - net-nds/ypbind/files/ypbind.initd
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / files / ypbind.initd
1 #!/sbin/openrc-run
2 #
3 # Copyright © 2018 Nick Bowler
4 # License GPLv3+: GNU General Public License version 3 or later.
5 # There is NO WARRANTY, to the extent permitted by law.
6
7 prefix=/
8 command=/usr/sbin/ypbind
9 pidfile=${prefix%/}/run/ypbind.pid
10
11 depend() {
12   need net portmap
13 }
14
15 start_post() {
16   for i in a b c d e; do
17     ypwhich >/dev/null 2>/dev/null && return
18     sleep 1
19   done
20
21   ewarn "timeout waiting for NIS binding"
22 }
23
24 stop_post() {
25   rm -f "${prefix%/}"/var/yp/binding/*
26 }