From 5d58b5da7200bcd985b270b8f60189e199db100f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 6 Jul 2020 16:00:15 -0700 Subject: [PATCH] Avoid '::' in $CONFIG_PATH Signed-off-by: Tom Eastep --- Shorewall-core/lib.core | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Shorewall-core/lib.core b/Shorewall-core/lib.core index 1671efc37..b6a9efe7e 100644 --- a/Shorewall-core/lib.core +++ b/Shorewall-core/lib.core @@ -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 }