mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
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>
This commit is contained in:
parent
3cc35a64e0
commit
ad7221c383
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=514225
@ -8,7 +8,7 @@
|
||||
|
||||
PORTNAME= ipsec-tools
|
||||
PORTVERSION= 0.8.2
|
||||
PORTREVISION= 10
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user