diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-01-21 01:41:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-01-21 01:41:17 +0000 |
commit | 3570b3f308f7de53ea93161587fa5dea8645e5bc (patch) | |
tree | c536a95853f41876fc7f61885f866dd5cf7d859b /etc/rc.d | |
parent | af72d40318c99576992ff869fc135505ce896eea (diff) |
Use ${rcexec} in rc_pre to do the config testing. This allows to specify
macros with spaces in them. With and OK ajacoutot
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/bgpd | 5 | ||||
-rw-r--r-- | etc/rc.d/httpd | 5 | ||||
-rw-r--r-- | etc/rc.d/iked | 5 | ||||
-rw-r--r-- | etc/rc.d/relayd | 5 | ||||
-rw-r--r-- | etc/rc.d/switchd | 5 | ||||
-rw-r--r-- | etc/rc.d/vmd | 5 |
6 files changed, 18 insertions, 12 deletions
diff --git a/etc/rc.d/bgpd b/etc/rc.d/bgpd index 3c8cdb2503e..b7e3e1657ad 100644 --- a/etc/rc.d/bgpd +++ b/etc/rc.d/bgpd @@ -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 diff --git a/etc/rc.d/httpd b/etc/rc.d/httpd index e80673156c9..bdd98f9b7d7 100644 --- a/etc/rc.d/httpd +++ b/etc/rc.d/httpd @@ -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 diff --git a/etc/rc.d/iked b/etc/rc.d/iked index 6f1d8ff4e63..d9a0d285557 100644 --- a/etc/rc.d/iked +++ b/etc/rc.d/iked @@ -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 diff --git a/etc/rc.d/relayd b/etc/rc.d/relayd index 283a11dfe0f..a2688e8f705 100644 --- a/etc/rc.d/relayd +++ b/etc/rc.d/relayd @@ -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 diff --git a/etc/rc.d/switchd b/etc/rc.d/switchd index 2ed0bc2daa5..bafb7c2c6ed 100644 --- a/etc/rc.d/switchd +++ b/etc/rc.d/switchd @@ -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 diff --git a/etc/rc.d/vmd b/etc/rc.d/vmd index a81ddcc93f3..4f8e8a7ae73 100644 --- a/etc/rc.d/vmd +++ b/etc/rc.d/vmd @@ -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() { |