From 426641a572de3e6043fa40c8a0d0c768658b73cc Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 22 Aug 2006 16:25:16 +0000 Subject: [PATCH] Bring forward BusyBox ash workaround git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4398 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/prog.footer | 10 ++++++++-- Shorewall/shorewall | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Shorewall/prog.footer b/Shorewall/prog.footer index 12a2f2e38..bf7c4895a 100644 --- a/Shorewall/prog.footer +++ b/Shorewall/prog.footer @@ -11,9 +11,15 @@ usage() { initialize # -# Start trace if first arg is "debug" or "trace" +# Start trace if first arg is "debug" or "trace" (the awkward code works around +# a bug in BusyBox ash on some distros). # -[ $# -gt 1 ] && [ "$1" = "debug" -o "$1" = "trace" ] && { set -x ; shift ; } +if [ $# -gt 1 ]; then + if [ "$1" = "debug" ] || [ "$1" = "trace" ]; then + set -x + shift + fi +fi finished=0 diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 45da9d0e7..258197c66 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -1567,9 +1567,11 @@ make_verbose() { # debugging= -if [ $# -gt 0 ] && [ "$1" = "debug" -o "$1" = "trace" ]; then - debugging=debug - shift +if [ $# -gt 0 ] ; then + if [ "$1" = "debug" ] || [ "$1" = "trace" ]; then + debugging=debug + shift + fi fi nolock=