Add some abbreviations for common commands

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-08-06 07:05:47 -07:00
parent ceffc000eb
commit a10aea280b
7 changed files with 79 additions and 78 deletions

View File

@ -3414,29 +3414,29 @@ usage() # $1 = exit status
echo " restart [ -n ] [ -p ] [ -f ] [ <directory> ]"
echo " restore [ -n ] [ <file name> ]"
echo " save [ <file name> ]"
echo " show [ -b ] [ -x ] [ -t {filter|mangle|nat} ] [ {chain [<chain> [ <chain> ... ]"
echo " show [ -f ] capabilities"
echo " show arptables"
echo " show classifiers"
echo " show config"
echo " show connections"
echo " show event [ <event> ...]"
echo " show events"
echo " show filters"
echo " show ip"
echo " [ show | list | ls ] [ -b ] [ -x ] [ -t {filter|mangle|nat} ] [ {chain [<chain> [ <chain> ... ]"
echo " [ show | list | ls ] [ -f ] capabilities"
echo " [ show | list | ls ] arptables"
echo " [ show | list | ls ] classifiers"
echo " [ show | list | ls ] config"
echo " [ show | list | ls ] connections"
echo " [ show | list | ls ] event [ <event> ...]"
echo " [ show | list | ls ] events"
echo " [ show | list | ls ] filters"
echo " [ show | list | ls ] ip"
if [ $g_family -eq 4 ]; then
echo " show ipa"
echo " [ show | list | ls ] ipa"
fi
echo " show [ -m ] log [<regex>]"
echo " show [ -x ] mangle|nat|raw|rawpost"
echo " show nfacct"
echo " show policies"
echo " show routing"
echo " show tc [ device ]"
echo " show vardir"
echo " show zones"
echo " [ show | list | ls ] [ -m ] log [<regex>]"
echo " [ show | list | ls ] [ -x ] mangle|nat|raw|rawpost"
echo " [ show | list | ls ] nfacct"
echo " [ show | list | ls ] policies"
echo " [ show | list | ls ] routing"
echo " [ show | list | ls ] tc [ device ]"
echo " [ show | list | ls ] vardir"
echo " [ show | list | ls ] zones"
echo " start [ -f ] [ -p ] [ <directory> ]"
echo " stop"
echo " status"
@ -3681,7 +3681,7 @@ shorewall_cli() {
fatal_error "$g_product is not running"
fi
;;
show|list)
show|list|ls)
get_config Yes No Yes
shift
show_command $@

View File

@ -335,7 +335,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-b</option></arg>
@ -357,7 +357,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-f</option></arg>
@ -371,7 +371,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg
choice="req"><option>classifiers|connections|config|events|filters|ip|ipa|zones|policies|marks</option></arg>
@ -384,7 +384,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>event</option><arg
choice="plain"><replaceable>event</replaceable></arg></arg>
@ -397,7 +397,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-x</option></arg>
@ -411,7 +411,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>tc</option></arg>
</cmdsynopsis>
@ -423,7 +423,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-m</option></arg>

View File

@ -1982,6 +1982,7 @@ sub supplied( $ ) {
# ensure that it has an appropriate number of columns.
# supply '-' in omitted trailing columns.
# Handles all of the supported forms of column/pair specification
# Handles segragating raw iptables input in INLINE rules
#
sub split_line1( $$;$$ ) {
my ( $description, $columnsref, $nopad, $maxcolumns ) = @_;
@ -1993,7 +1994,7 @@ sub split_line1( $$;$$ ) {
$inline_matches = '';
#
# First see if there is a semicolon on the line; what follows will be column/value paris
# First see if there is a semicolon on the line; what follows will be column/value pairs or raw iptables input
#
my ( $columns, $pairs, $rest ) = split( ';', $currentline );

View File

@ -1578,9 +1578,9 @@ usage() # $1 = exit status
echo "where <command> is one of:"
echo " add <interface>[:<host-list>] ... <zone>"
echo " allow <address> ..."
echo " check [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ <directory> ]"
echo " [ check | ck ] [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ <directory> ]"
echo " clear"
echo " compile [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ <directory name> ] [ <path name> ]"
echo " [ compile | co ] [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ <directory name> ] [ <path name> ]"
echo " delete <interface>[:<host-list>] ... <zone>"
echo " disable <interface>"
echo " drop <address> ..."
@ -1623,31 +1623,31 @@ usage() # $1 = exit status
echo " safe-restart [ -t <timeout> ] [ <directory> ]"
echo " safe-start [ -t <timeout> ] [ <directory> ]"
echo " save [ <file name> ]"
echo " show [ -x ] [ -t {filter|mangle|nat|raw|rawpost} ] [ {chain [<chain> [ <chain> ... ]"
echo " show actions"
echo " show [ -f ] capabilities"
echo " show classifiers"
echo " show config"
echo " show connections"
echo " show dynamic <zone>"
echo " show filters"
echo " show ip"
echo " [ show | list | ls ] [ -x ] [ -t {filter|mangle|nat|raw|rawpost} ] [ {chain [<chain> [ <chain> ... ]"
echo " [ show | list | ls ] actions"
echo " [ show | list | ls ] [ -f ] capabilities"
echo " [ show | list | ls ] classifiers"
echo " [ show | list | ls ] config"
echo " [ show | list | ls ] connections"
echo " [ show | list | ls ] dynamic <zone>"
echo " [ show | list | ls ] filters"
echo " [ show | list | ls ] ip"
if [ $g_family -eq 4 ]; then
echo " show ipa"
echo " [ show | list | ls ] ipa"
fi
echo " show [ -m ] log [<regex>]"
echo " show macro <macro>"
echo " show macros"
echo " show marks"
echo " show [ -x ] mangle|nat|raw|rawpost|routing"
echo " show nfacct"
echo " show policies"
echo " show routing"
echo " show tc [ device ]"
echo " show vardir"
echo " show zones"
echo " [ show | list | ls ] [ -m ] log [<regex>]"
echo " [ show | list | ls ] macro <macro>"
echo " [ show | list | ls ] macros"
echo " [ show | list | ls ] marks"
echo " [ show | list | ls ] [ -x ] mangle|nat|raw|rawpost|routing"
echo " [ show | list | ls ] nfacct"
echo " [ show | list | ls ] policies"
echo " [ show | list | ls ] routing"
echo " [ show | list | ls ] tc [ device ]"
echo " [ show | list | ls ] vardir"
echo " [ show | list | ls ] zones"
echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ -T ] [ <directory> ]"
echo " status"
echo " stop"
@ -1661,7 +1661,7 @@ usage() # $1 = exit status
compiler_command() {
case $COMMAND in
compile)
compile|co)
shift
compile_command $@
;;
@ -1670,7 +1670,7 @@ compiler_command() {
shift
refresh_command $@
;;
check)
check|ck)
shift
check_command $@
;;

View File

@ -54,7 +54,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>check</option></arg>
<arg choice="plain"><arg><option>check | ck </option></arg></arg>
<arg><option>-e</option></arg>
@ -88,7 +88,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>compile</option></arg>
<arg choice="plain"><arg><option>compile | co </option></arg></arg>
<arg><option>-e</option></arg>
@ -502,7 +502,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-b</option></arg>
@ -524,7 +524,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-f</option></arg>
@ -538,7 +538,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg
choice="req"><option>actions|classifiers|connections|config|events|filters|ip|ipa|macros|zones|policies|marks</option></arg>
@ -551,7 +551,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>event</option><arg
choice="plain"><replaceable>event</replaceable></arg></arg>
@ -564,7 +564,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>macro</option><arg
choice="plain"><replaceable>macro</replaceable></arg></arg>
@ -577,7 +577,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-x</option></arg>
@ -591,7 +591,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>tc</option></arg>
</cmdsynopsis>
@ -603,7 +603,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-m</option></arg>

View File

@ -335,7 +335,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-b</option></arg>
@ -357,7 +357,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-f</option></arg>
@ -371,7 +371,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg
choice="req"><option>classifiers|connections|config|events|filters|ip|ipa|zones|policies|marks</option></arg>
@ -384,7 +384,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>event</option><arg
choice="plain"><replaceable>event</replaceable></arg></arg>
@ -397,7 +397,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-x</option></arg>
@ -411,7 +411,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>tc</option></arg>
</cmdsynopsis>
@ -423,7 +423,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-m</option></arg>

View File

@ -53,7 +53,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>check</option></arg>
<arg choice="opt"><option>check | ck </option></arg>
<arg><option>-e</option></arg>
@ -86,7 +86,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>compile</option></arg>
<arg choice="opt"><option>compile | co </option></arg>
<arg><option>-e</option></arg>
@ -447,7 +447,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-b</option></arg>
@ -469,7 +469,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-f</option></arg>
@ -483,7 +483,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg
choice="req"><option>actions|classifiers|connections|config|events|filters|ip|macros|zones|policies|tc|marks</option></arg>
@ -496,7 +496,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>event</option><arg
choice="plain"><replaceable>event</replaceable></arg></arg>
@ -509,7 +509,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg choice="plain"><option>tc</option></arg>
</cmdsynopsis>
@ -521,7 +521,7 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>show</option></arg>
<arg choice="opt"><option>show | list | ls </option></arg>
<arg><option>-m</option></arg>