diff options
author | eugen <eugen@FreeBSD.org> | 2019-10-10 21:15:13 +0800 |
---|---|---|
committer | eugen <eugen@FreeBSD.org> | 2019-10-10 21:15:13 +0800 |
commit | c82c83c33e10455a45c45c35e48fa2ff8fa98795 (patch) | |
tree | 51648a474187aaad883ce18b46f7d5a5cb890c0a | |
parent | 16e1e22d02b3c47d9d9ec36fbd9aca098ccd182c (diff) | |
download | freebsd-ports-gnome-c82c83c33e10455a45c45c35e48fa2ff8fa98795.tar.gz freebsd-ports-gnome-c82c83c33e10455a45c45c35e48fa2ff8fa98795.tar.zst freebsd-ports-gnome-c82c83c33e10455a45c45c35e48fa2ff8fa98795.zip |
security/ipsec-tools: unbreak racoon_create_dirs
Specifying required_dirs and creating it at prestart stage does not work
because required_dirs is checked before running prestart these days.
So it fails to start for mfs-based /var even if racoon_create_dirs=YES
Unbreak this by replacing "required_dirs" and "mkdir -p"
in the racoon_prestart with "install -d" that returns error in case
of failure and does nothing if the directory already exists.
Reported by: Cybil Courraud <freebsd@cyb.fr>
-rw-r--r-- | security/ipsec-tools/Makefile | 2 | ||||
-rw-r--r-- | security/ipsec-tools/files/racoon.in | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/security/ipsec-tools/Makefile b/security/ipsec-tools/Makefile index 716d2b0df335..1ae23a232107 100644 --- a/security/ipsec-tools/Makefile +++ b/security/ipsec-tools/Makefile @@ -8,7 +8,7 @@ PORTNAME= ipsec-tools PORTVERSION= 0.8.2 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= security MASTER_SITES= SF diff --git a/security/ipsec-tools/files/racoon.in b/security/ipsec-tools/files/racoon.in index 007c55b6e2aa..c9a9e3474b82 100644 --- a/security/ipsec-tools/files/racoon.in +++ b/security/ipsec-tools/files/racoon.in @@ -21,7 +21,8 @@ rcvar=racoon_enable load_rc_config $name racoon_enable=${racoon_enable:-"NO"} # Disable by default -racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $required_dirs +racoon_dirs=${racoon_dirs:-"%%STATEDIR%%"} # For controlling socket +racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $racoon_dirs #racoon_flags="" # Flags to racoon program command="%%PREFIX%%/sbin/${name}" @@ -32,7 +33,6 @@ stop_postcmd="${name}_cleanup" socketfile="%%STATEDIR%%/${name}.sock" required_files="%%PREFIX%%/etc/${name}/${name}.conf" -required_dirs="%%STATEDIR%%" required_modules="%%REQUIREMOD%%" racoon_cleanup() @@ -46,7 +46,7 @@ racoon_prestart() racoon_cleanup if checkyesno "${name}_create_dirs"; then - /bin/mkdir -p $required_dirs + install -m 0755 -d $racoon_dirs fi } |