Add and document the show rc command

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Matt Darfeuille 2018-03-16 13:29:02 +01:00 committed by Tom Eastep
parent 47a59cdd7c
commit 9b5468cd4a
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1432,6 +1432,17 @@ show_command() {
vardir)
echo $VARDIR;
;;
rc)
shift
[ $# -gt 1 ] && too_many_arguments $2
if [ -n "$1" -a -d "$1" ]; then
cat $1/shorewallrc
elif [ -n "$g_basedir" -a -d "$g_basedir" ]; then
cat $g_basedir/shorewallrc
else
fatal_error "Can not determine the location of the shorewall program."
fi
;;
policies)
only_root
[ $# -gt 1 ] && too_many_arguments $2
@ -4373,6 +4384,7 @@ usage() # $1 = exit status
echo " [ show | list | ls ] saves"
echo " [ show | list | ls ] tc [ device ]"
echo " [ show | list | ls ] vardir"
echo " [ show | list | ls ] rc [ <remote-dir-path-of-sw-program> ]"
echo " [ show | list | ls ] zones"
if [ -n "$g_lite" ]; then