mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +01:00
Add 'show macro' command
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d164880381
commit
6c62f14749
@ -641,6 +641,18 @@ show_command() {
|
|||||||
grep -Ev '^\#|^$' ${SHAREDIR}/actions.std
|
grep -Ev '^\#|^$' ${SHAREDIR}/actions.std
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
macro)
|
||||||
|
[ $# -ne 2 ] && usage 1
|
||||||
|
for directory in $(split $CONFIG_PATH); do
|
||||||
|
if [ -f ${directory}/macro.$2 ]; then
|
||||||
|
echo "Shorewall $version Macro $2 at $HOSTNAME - $(date)"
|
||||||
|
cat ${directory}/macro.$2
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo " WARNING: Macro $2 not found" >&2
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
macros)
|
macros)
|
||||||
|
@ -1387,6 +1387,7 @@ usage() # $1 = exit status
|
|||||||
echo " show filters"
|
echo " show filters"
|
||||||
echo " show ip"
|
echo " show ip"
|
||||||
echo " show [ -m ] log"
|
echo " show [ -m ] log"
|
||||||
|
echo " show macro <macro>"
|
||||||
echo " show macros"
|
echo " show macros"
|
||||||
echo " show [ -x ] mangle|nat|raw|routing"
|
echo " show [ -x ] mangle|nat|raw|routing"
|
||||||
echo " show policies"
|
echo " show policies"
|
||||||
|
Loading…
Reference in New Issue
Block a user