Browse Source

Use ${rcexec} in rc_pre to do the config testing. This allows to specify

macros with spaces in them. With and OK ajacoutot
OPENBSD_6_5
claudio 6 years ago
parent
commit
a183799afe
6 changed files with 18 additions and 12 deletions
  1. +3
    -2
      src/etc/rc.d/bgpd
  2. +3
    -2
      src/etc/rc.d/httpd
  3. +3
    -2
      src/etc/rc.d/iked
  4. +3
    -2
      src/etc/rc.d/relayd
  5. +3
    -2
      src/etc/rc.d/switchd
  6. +3
    -2
      src/etc/rc.d/vmd

+ 3
- 2
src/etc/rc.d/bgpd View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: bgpd,v 1.4 2018/01/11 19:52:12 rpe Exp $
# $OpenBSD: bgpd,v 1.5 2019/01/21 01:41:16 claudio Exp $
daemon="/usr/sbin/bgpd"
@ -8,7 +8,8 @@ daemon="/usr/sbin/bgpd"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1

+ 3
- 2
src/etc/rc.d/httpd View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: httpd,v 1.6 2018/01/11 19:52:12 rpe Exp $
# $OpenBSD: httpd,v 1.7 2019/01/21 01:41:16 claudio Exp $
daemon="/usr/sbin/httpd"
@ -8,7 +8,8 @@ daemon="/usr/sbin/httpd"
# child will not return a config parsing error to the parent
rc_pre() {
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1

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

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: iked,v 1.6 2018/01/11 22:44:44 rpe Exp $
# $OpenBSD: iked,v 1.7 2019/01/21 01:41:16 claudio Exp $
daemon="/sbin/iked"
@ -13,7 +13,8 @@ rc_pre() {
[[ ${sasyncd_flags} != NO ]] &&
daemon_flags="-S ${daemon_flags}"
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1

+ 3
- 2
src/etc/rc.d/relayd View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: relayd,v 1.5 2018/01/11 22:44:44 rpe Exp $
# $OpenBSD: relayd,v 1.6 2019/01/21 01:41:16 claudio Exp $
daemon="/usr/sbin/relayd"
@ -8,7 +8,8 @@ daemon="/usr/sbin/relayd"
# Child will not return a config parsing error to the parent.
rc_pre() {
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1

+ 3
- 2
src/etc/rc.d/switchd View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: switchd,v 1.3 2018/01/11 22:44:44 rpe Exp $
# $OpenBSD: switchd,v 1.4 2019/01/21 01:41:16 claudio Exp $
daemon="/usr/sbin/switchd"
@ -8,7 +8,8 @@ daemon="/usr/sbin/switchd"
# Child will not return a config loading error to the parent.
rc_pre() {
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1

+ 3
- 2
src/etc/rc.d/vmd View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: vmd,v 1.9 2018/09/27 17:15:36 reyk Exp $
# $OpenBSD: vmd,v 1.10 2019/01/21 01:41:16 claudio Exp $
daemon="/usr/sbin/vmd"
@ -8,7 +8,8 @@ daemon="/usr/sbin/vmd"
# Child will not return a config parsing error to the parent.
rc_pre() {
${daemon} -n ${daemon_flags}
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_stop() {


Loading…
Cancel
Save