diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index bc9318b77..4778ada32 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -4560,6 +4560,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..3d0bacb1d 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 ! qt ps | grep -v grep | grep ${lockpid}; then rm -f ${lockf} error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed" fi @@ -788,10 +788,9 @@ 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} + chmod u=r ${lockf} + lock ${lockf} else while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do sleep 1 @@ -813,6 +812,7 @@ mutex_on() # mutex_off() { + [ -f ${CONFDIR}/rc.common ] && lock -u ${LOCKFILE:=${VARDIR}/lock} rm -f ${LOCKFILE:=${VARDIR}/lock} } 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