--- /dev/null
+#!/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/*
+}