diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index dc95be248..bc8a4985c 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -361,6 +361,15 @@ show_routing() { show_command() { local finished=0 local table=filter + show_macro() { + foo=`grep 'This macro' $macro | sed 's/This macro //'` + if [ -n "$foo" ]; then + macro=${macro#*.} + foo=${foo%.*} + echo " $macro ${foo#\#}" + fi + } + while [ $finished -eq 0 -a $# -gt 0 ]; do option=$1 case $option in @@ -529,13 +538,24 @@ show_command() { ;; macros) [ $# -gt 1 ] && usage 1 - for macro in ${SHAREDIR}/macro.*; do - foo=`grep 'This macro' $macro | sed 's/This macro //'` - if [ -n "$foo" ]; then - macro=${macro#*.} - foo=${foo%.*} - echo " $macro ${foo#\#}" - fi + + for directory in $(split $CONFIG_PATH); do + temp= + for macro in ${directory}/macro.*; do + case $macro in + *\*) + ;; + *) + if [ -z "$temp" ]; then + echo + echo "Macros in $directory:" + echo + temp=Yes + fi + show_macro + ;; + esac + done done return ;; diff --git a/Shorewall/shorewall b/Shorewall/shorewall index b73c6ed3e..f4dbbf4ae 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -1209,7 +1209,8 @@ case "$COMMAND" in fi elif ! $IPTABLES -L shorewall > /dev/null 2> /dev/null; then $0 $VERBOSE $NOROUTES start - elif [ $# -eq 3 ]; the sleep $3 + elif [ $# -eq 3 ]; then + sleep $3 $0 $VERBOSE $NOROUTES restart fi ;;