]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - net-nds/ypbind/files/ypbind.initd
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / files / ypbind.initd
diff --git a/net-nds/ypbind/files/ypbind.initd b/net-nds/ypbind/files/ypbind.initd
new file mode 100644 (file)
index 0000000..860bbf2
--- /dev/null
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+#
+# Copyright © 2018 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or later.
+# There is NO WARRANTY, to the extent permitted by law.
+
+prefix=/
+command=/usr/sbin/ypbind
+pidfile=${prefix%/}/run/ypbind.pid
+
+depend() {
+  need net portmap
+}
+
+start_post() {
+  for i in a b c d e; do
+    ypwhich >/dev/null 2>/dev/null && return
+    sleep 1
+  done
+
+  ewarn "timeout waiting for NIS binding"
+}
+
+stop_post() {
+  rm -f "${prefix%/}"/var/yp/binding/*
+}