diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index ef0095806..de0a98ad4 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -4587,6 +4587,11 @@ shorewall_cli() { # It's a shell function -- call it # $@ + elif type $1 2> /dev/null | fgrep -q 'is a shell function'; then + # + # It's a shell function -- call it + # + $@ else # # It isn't a function visible to this script -- try diff --git a/Shorewall-core/lib.common b/Shorewall-core/lib.common index 03ecb2a4a..8570b1247 100644 --- a/Shorewall-core/lib.common +++ b/Shorewall-core/lib.common @@ -776,7 +776,7 @@ mutex_on() error_message "WARNING: Stale lockfile ${lockf} removed" elif [ $lockpid -eq $$ ]; then return 0 - elif ! qt ps p ${lockpid}; then + elif ! ps | grep -v grep | qt grep ${lockpid}; then rm -f ${lockf} error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed" fi @@ -788,10 +788,8 @@ mutex_on() echo $$ > ${lockf} chmod u-w ${lockf} elif qt mywhich lock; then - lock -${MUTEX_TIMEOUT} -r1 ${lockf} - chmod u+w ${lockf} - echo $$ > ${lockf} - chmod u-w ${lockf} + lock ${lockf} + chmod u=r ${lockf} else while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do sleep 1 @@ -813,6 +811,7 @@ mutex_on() # mutex_off() { + [ -f ${CONFDIR}/rc.common ] && lock -u ${LOCKFILE:=${VARDIR}/lock} rm -f ${LOCKFILE:=${VARDIR}/lock} } diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 2d1a044e3..d0aaf102a 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -412,7 +412,7 @@ if [ $HOST = debian ]; then if [ ! -f ${DESTDIR}${CONFDIR}/default/shorewall-init ]; then if [ -n "${DESTDIR}" ]; then - mkdir ${DESTDIR}${ETC}/default + mkdir -p ${DESTDIR}${ETC}/default fi [ $configure -eq 1 ] || mkdir -p ${DESTDIR}${CONFDIR}/default @@ -585,7 +585,7 @@ if [ -z "$DESTDIR" ]; then fi else if [ $configure -eq 1 -a -n "$first_install" ]; then - if [ $HOST = debian ]; then + if [ $HOST = debian -a -z "$SERVICEDIR" ]; then if [ -n "${DESTDIR}" ]; then mkdir -p ${DESTDIR}/etc/rcS.d fi diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 439d4a9f0..c8bffe108 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -550,7 +550,7 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR fi install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT} 0640 - echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}" + echo "$SYSCONFFILE file installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}" fi if [ ${SHAREDIR} != /usr/share ]; then diff --git a/Shorewall/install.sh b/Shorewall/install.sh index bdd82715c..581ae5079 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -1215,7 +1215,7 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR fi run_install $OWNERSHIP -m 0644 ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/$PRODUCT - echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}" + echo "$SYSCONFFILE file installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}" fi if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then diff --git a/docs/blacklisting_support.xml b/docs/blacklisting_support.xml index d611197be..5d50ee244 100644 --- a/docs/blacklisting_support.xml +++ b/docs/blacklisting_support.xml @@ -48,7 +48,7 @@
Introduction - Shorewall supports two different types of blackliisting; rule-based, + Shorewall supports two different types of blacklisting; rule-based, static and dynamic. The BLACKLIST option in /etc/shorewall/shorewall.conf controls the degree of blacklist filtering.