From c252005e257180a9d5c152a54fb22202384c80f8 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 23 Feb 2012 10:07:02 -0800 Subject: [PATCH] Add support for packager's config file Signed-off-by: Tom Eastep --- Shorewall-core/install.sh | 7 +++++++ Shorewall-init/install.sh | 7 +++++++ Shorewall-lite/install.sh | 5 +++++ Shorewall/install.sh | 5 +++++ 4 files changed, 24 insertions(+) diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh index 659f7a69f..5441b8d4a 100755 --- a/Shorewall-core/install.sh +++ b/Shorewall-core/install.sh @@ -85,6 +85,13 @@ install_file() # $1 = source $2 = target $3 = mode run_install $T $OWNERSHIP -m $3 $1 ${2} } +cd "$(dirname $0)" + +# +# Load packager's settings if any +# +[ -f ../shorewall-pkg.config ] && . ../shorewall-pkg.config + [ -n "$DESTDIR" ] || DESTDIR="$PREFIX" # diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 754c6b612..15a8f9037 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -86,6 +86,13 @@ install_file() # $1 = source $2 = target $3 = mode run_install $T $OWNERSHIP -m $3 $1 ${2} } +cd "$(dirname $0)" + +# +# Load packager's settings if any +# +[ -f ../shorewall-pkg.config ] && . ../shorewall-pkg.config + [ -n "$DESTDIR" ] || DESTDIR="$PREFIX" while [ $# -gt 0 ] ; do diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 20ebe1816..c4cfb995f 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -90,6 +90,11 @@ install_file() # $1 = source $2 = target $3 = mode # cd "$(dirname $0)" +# +# Load packager's settings if any +# +[ -f ../shorewall-pkg.config ] && . ../shorewall-pkg.config + if [ -f shorewall-lite ]; then PRODUCT=shorewall-lite Product="Shorewall Lite" diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 8fe742a35..e843d20c4 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -92,6 +92,11 @@ install_file() # $1 = source $2 = target $3 = mode cd "$(dirname $0)" +# +# Load packager's settings if any +# +[ -f ../shorewall-pkg.config ] && . ../shorewall-pkg.config + if [ -f shorewall ]; then PRODUCT=shorewall Product=Shorewall