Browse Source

Child will not return a config parsing error to the parent so rc.d will lie and

tell you that the daemon succesfully started; prevent this by running a config
check first.
Note that we only do this for those particular daemons, not all that support a
config test mode.
ok benno@ phessler@
OPENBSD_5_9
ajacoutot 9 years ago
parent
commit
55908109a4
5 changed files with 28 additions and 6 deletions
  1. +6
    -1
      src/etc/rc.d/bgpd
  2. +6
    -1
      src/etc/rc.d/httpd
  3. +4
    -2
      src/etc/rc.d/iked
  4. +6
    -1
      src/etc/rc.d/relayd
  5. +6
    -1
      src/etc/rc.d/vmd

+ 6
- 1
src/etc/rc.d/bgpd View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: bgpd,v 1.1 2011/07/06 18:55:36 robert Exp $
# $OpenBSD: bgpd,v 1.2 2015/12/19 13:45:12 ajacoutot Exp $
daemon="/usr/sbin/bgpd" daemon="/usr/sbin/bgpd"
@ -8,4 +8,9 @@ daemon="/usr/sbin/bgpd"
pexp="bgpd: parent.*" pexp="bgpd: parent.*"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
}
rc_cmd $1 rc_cmd $1

+ 6
- 1
src/etc/rc.d/httpd View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: httpd,v 1.3 2014/07/22 17:37:16 reyk Exp $
# $OpenBSD: httpd,v 1.4 2015/12/19 13:45:12 ajacoutot Exp $
daemon="/usr/sbin/httpd" daemon="/usr/sbin/httpd"
@ -8,4 +8,9 @@ daemon="/usr/sbin/httpd"
pexp="httpd: parent.*" pexp="httpd: parent.*"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
}
rc_cmd $1 rc_cmd $1

+ 4
- 2
src/etc/rc.d/iked View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: iked,v 1.2 2015/12/19 10:09:04 ajacoutot Exp $
# $OpenBSD: iked,v 1.3 2015/12/19 13:45:12 ajacoutot Exp $
daemon="/sbin/iked" daemon="/sbin/iked"
@ -11,7 +11,9 @@ pexp="iked: parent.*"
rc_pre() { rc_pre() {
[ X"${sasyncd_flags}" != X"NO" ] && \ [ X"${sasyncd_flags}" != X"NO" ] && \
daemon_flags="-S ${daemon_flags}" daemon_flags="-S ${daemon_flags}"
return 0
#return 0
# child will not return a config parsing error to the parent
${daemon} -n ${daemon_flags}
} }
rc_cmd $1 rc_cmd $1

+ 6
- 1
src/etc/rc.d/relayd View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: relayd,v 1.1 2011/07/06 18:55:36 robert Exp $
# $OpenBSD: relayd,v 1.2 2015/12/19 13:45:12 ajacoutot Exp $
daemon="/usr/sbin/relayd" daemon="/usr/sbin/relayd"
@ -8,4 +8,9 @@ daemon="/usr/sbin/relayd"
pexp="relayd: parent.*" pexp="relayd: parent.*"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
}
rc_cmd $1 rc_cmd $1

+ 6
- 1
src/etc/rc.d/vmd View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: vmd,v 1.2 2015/12/16 14:21:28 jturner Exp $
# $OpenBSD: vmd,v 1.3 2015/12/19 13:45:12 ajacoutot Exp $
daemon="/usr/sbin/vmd" daemon="/usr/sbin/vmd"
@ -8,4 +8,9 @@ daemon="/usr/sbin/vmd"
pexp="vmd: parent.*" pexp="vmd: parent.*"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
}
rc_cmd $1 rc_cmd $1

Loading…
Cancel
Save