iked and isakmpd guard against themselves with "return 0" as rc.subr(8)
checks rc_pre()'s return code and aborts daemo start iff non-zero, but
that isn't needed if we use ksh properly.
#!/bin/ksh
#
-# $OpenBSD: iked,v 1.10 2022/09/04 06:57:13 ajacoutot Exp $
+# $OpenBSD: iked,v 1.11 2024/09/23 20:54:01 kn Exp $
daemon="/sbin/iked"
# use rc_exec here since daemon_flags may contain arguments with spaces
rc_exec "${daemon} -n ${daemon_flags}"
}
+
rc_pre() {
- [[ ${sasyncd_flags} != NO ]] &&
+ if [[ ${sasyncd_flags} != NO ]]; then
daemon_flags="-S ${daemon_flags}"
- return 0
+ fi
}
rc_cmd $1
#!/bin/ksh
#
-# $OpenBSD: isakmpd,v 1.3 2018/01/11 21:09:26 rpe Exp $
+# $OpenBSD: isakmpd,v 1.4 2024/09/23 20:54:01 kn Exp $
daemon="/sbin/isakmpd"
pexp="isakmpd: monitor \[priv\]"
rc_pre() {
- [[ ${sasyncd_flags} != NO ]] &&
+ if [[ ${sasyncd_flags} != NO ]]; then
daemon_flags="-S ${daemon_flags}"
- return 0
+ fi
}
rc_cmd $1