Avoid '::' in $CONFIG_PATH

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2020-07-06 16:00:15 -07:00
parent 4469ddb861
commit 5d58b5da72
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -337,8 +337,15 @@ ensure_config_path() {
. $F
fi
if [ -n "$g_shorewalldir" ]; then
[ "${CONFIG_PATH%%:*}" = "$g_shorewalldir" ] || CONFIG_PATH=$g_shorewalldir:$CONFIG_PATH
if [ -n "$g_shorewalldir" ] && [ "${CONFIG_PATH%%:*}" = "$g_shorewalldir" ];then
case $CONFIG_PATH in
:*)
CONFIG_PATH=${g_shorewalldir}${CONFIG_PATH}
;;
*)
CONFIG_PATH=$g_shorewalldir:$CONFIG_PATH
;;
esac
fi
}