Browse Source

Fix a small regression reported by nicm@: when domainname is set but

/var/yp/binding does not exist, do _not_ try to start ypbind.
Make it possible to start ypbind the same way as the other daemons
(using ypbind_flags) while preserving the historical startup behavior.
tested by deraadt@
OPENBSD_5_1
ajacoutot 13 years ago
parent
commit
21d126d25a
2 changed files with 6 additions and 4 deletions
  1. +4
    -2
      src/etc/rc.conf
  2. +2
    -2
      src/etc/rc.d/ypbind

+ 4
- 2
src/etc/rc.conf View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: rc.conf,v 1.162 2011/09/20 15:47:25 ajacoutot Exp $
# $OpenBSD: rc.conf,v 1.163 2011/10/07 05:54:48 ajacoutot Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
ldpd_flags=NO # for normal use: ""
@ -96,6 +96,7 @@ multicast_router=NO # A multicast routing daemon will be run, e.g. mrouted
# miscellaneous other flags
savecore_flags= # "-z" to compress
ypbind_flags=NO # for normal use: ""
ypserv_flags=NO # add more flags, eg. -1 for YP v1, -d for DNS etc
ypldap_flags=NO # for normal use: ""
yppasswdd_flags=NO # "-d /etc/yp" if passwd files are in /etc/yp
@ -121,7 +122,7 @@ local_rcconf="/etc/rc.conf.local"
unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags
unset kpasswdd_flags btd_flags nfsd_flags mountd_flags lockd_flags
unset statd_flags amd_flags
unset statd_flags amd_flags ypbind_flags
[ -f ${local_rcconf} ] && . ${local_rcconf} # Do not edit this line
@ -150,3 +151,4 @@ fi
: ${lockd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)}
: ${statd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)}
: ${amd_flags=$([ X"${amd-NO}" = XYES ] || echo NO)}
: ${ypbind_flags=$([ X"`domainname`" != X"" -a -d /var/yp/binding ] || echo NO)}

+ 2
- 2
src/etc/rc.d/ypbind View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: ypbind,v 1.3 2011/07/08 02:15:34 robert Exp $
# $OpenBSD: ypbind,v 1.4 2011/10/07 05:54:48 ajacoutot Exp $
daemon="/usr/sbin/ypbind"
@ -10,7 +10,7 @@ rc_bg=YES
rc_reload=NO
rc_pre() {
[ X"`domainname`" != X"" -a -d /var/yp/binding ]
[ X"`domainname`" != X"" ]
}
rc_cmd $1

Loading…
Cancel
Save