From 9b5468cd4a5fc167d555db6b8bca464051b42be4 Mon Sep 17 00:00:00 2001 From: Matt Darfeuille Date: Fri, 16 Mar 2018 13:29:02 +0100 Subject: [PATCH] Add and document the show rc command Signed-off-by: Matt Darfeuille Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index cb8b89d4a..bbf635960 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -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 [ ]" echo " [ show | list | ls ] zones" if [ -n "$g_lite" ]; then