diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 8683171c9..3a9d0d090 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -88,9 +88,6 @@ install_file() # $1 = source $2 = target $3 = mode [ -n "$DESTDIR" ] || DESTDIR="$PREFIX" -# -# Parse the run line -# # DEST is the SysVInit script directory # INIT is the name of the script in the $DEST directory # ARGS is "yes" if we've already parsed an argument @@ -125,6 +122,15 @@ done PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin [ -n "${LIBEXEC:=/usr/share}" ] + +case "$LIBEXEC" in + /*) + ;; + *) + LIBEXEC=/usr/${LIBEXEC} + ;; +esac + # # Determine where to install the firewall script # diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 6e408fc6d..c430b9014 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -124,6 +124,15 @@ done PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin [ -n "${LIBEXEC:=/usr/share}" ] + +case "$LIBEXEC" in + /*) + ;; + *) + LIBEXEC=/usr/${LIBEXEC} + ;; +esac + # # Determine where to install the firewall script # diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 8e7a21e22..75703133d 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -110,6 +110,22 @@ MANDIR=${MANDIR:-"/usr/share/man"} [ -n "${LIBEXEC:=/usr/share}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ] +case "$LIBEXEC" in + /*) + ;; + *) + LIBEXEC=/usr/${LIBEXEC} + ;; +esac + +case "$PERLLIB" in + /*) + ;; + *) + PERLLIB=/usr/${PERLLIB} + ;; +esac + INSTALLD='-D' case $(uname) in diff --git a/Shorewall6-lite/install.sh b/Shorewall6-lite/install.sh index e41f54746..31f913c4a 100755 --- a/Shorewall6-lite/install.sh +++ b/Shorewall6-lite/install.sh @@ -124,6 +124,15 @@ done PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin [ -n "${LIBEXEC:=/usr/share}" ] + +case "$LIBEXEC" in + /*) + ;; + *) + LIBEXEC=/usr/${LIBEXEC} + ;; +esac + # # Determine where to install the firewall script # diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index 620cd18a5..54a35f14d 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -113,6 +113,22 @@ INSTALLD='-D' [ -n "${LIBEXEC:=/usr/share}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ] +case "$LIBEXEC" in + /*) + ;; + *) + LIBEXEC=/usr/${LIBEXEC} + ;; +esac + +case "$PERLLIB" in + /*) + ;; + *) + PERLLIB=/usr/${PERLLIB} + ;; +esac + case $(uname) in CYGWIN*) if [ -z "$DESTDIR" ]; then