From 922bd9eeca688ad152a8dd819e3c978acebf2a8e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 9 Jul 2017 16:18:09 -0700 Subject: [PATCH] Implement SPARSE=Very - Only installs the .conf file. Signed-off-by: Tom Eastep --- Shorewall/install.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 651085c12..5f02d2e54 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -616,8 +616,14 @@ run_install $OWNERSHIP -m 0644 params.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/c if [ -f ${DESTDIR}${CONFDIR}/$PRODUCT/params ]; then chmod 0644 ${DESTDIR}${CONFDIR}/$PRODUCT/params else - run_install $OWNERSHIP -m 0600 params${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/params - echo "Parameter file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/params" + case "$SPARSE" in + [Vv]ery) + ;; + *) + run_install $OWNERSHIP -m 0600 params${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/params + echo "Parameter file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/params" + ;; + esac fi if [ $PRODUCT = shorewall ]; then @@ -693,10 +699,16 @@ fi run_install $OWNERSHIP -m 0644 conntrack ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles run_install $OWNERSHIP -m 0644 conntrack.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles -if [ ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack ]; then - run_install $OWNERSHIP -m 0600 conntrack${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack - echo "Conntrack file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack" -fi +case "$SPARSE" in + [Vv]ery) + ;; + *) + if [ ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack ]; then + run_install $OWNERSHIP -m 0600 conntrack${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack + echo "Conntrack file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack" + fi + ;; +esac # # Install the Mangle file