summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:51:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:51:12 +0000
commitbe21318f5375da06c3c46a78a2dad9f816158ec6 (patch)
treee70624bf3705c492e5182aa9ed9b6af213ddf58d
parenta1c375a48cfad44385fe17a4425dd7dd0f3d5326 (diff)
Forcibly delete /var/run/ypbind.lock to prepare for the worst cases.
ok aja
-rw-r--r--etc/rc3
-rw-r--r--etc/rc.d/ypbind6
2 files changed, 7 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index d11b86388e5..5b2667b2d26 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.465 2015/10/03 18:57:11 renato Exp $
+# $OpenBSD: rc,v 1.466 2015/10/18 03:51:11 deraadt Exp $
# System startup script run by init on autoboot or after single-user.
# Output and error are redirected to console by init, and the console is the
@@ -363,6 +363,7 @@ fi
echo -n 'starting RPC daemons:'
start_daemon portmap ypldap
+rm -f /var/run/ypbind.lock
if [[ -n $(domainname) ]]; then
start_daemon ypserv ypbind yppasswdd
fi
diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind
index 167efcd6224..32bc81baff9 100644
--- a/etc/rc.d/ypbind
+++ b/etc/rc.d/ypbind
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: ypbind,v 1.4 2011/10/07 05:54:48 ajacoutot Exp $
+# $OpenBSD: ypbind,v 1.5 2015/10/18 03:51:11 deraadt Exp $
daemon="/usr/sbin/ypbind"
@@ -13,4 +13,8 @@ rc_pre() {
[ X"`domainname`" != X"" ]
}
+rc_post() {
+ rm -f /var/run/ypbind.lock
+}
+
rc_cmd $1