From 0461e5de20c2b10e830635d9e1ff10d78194fd05 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 13 Feb 2013 12:45:28 -0800 Subject: [PATCH] Standardize the 'Ordinary Users' error messages. Signed-off-by: Tom Eastep --- Shorewall/lib.cli-std | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index 4f0c9a2a5..8811149ed 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -46,9 +46,10 @@ get_config() { fi fi - if [ "$(id -u)" -eq 0 ]; then + if [ "$(id -u)" -eq 0 ]; then config=$(find_file $g_program.conf) else + [ -n "$g_shorewalldir" ] || fatal_error "Ordinary users may not $COMMAND the $CONFDIR/$g_program configuration" config="$g_shorewalldir/$g_program.conf" fi @@ -381,7 +382,7 @@ compiler() { if [ $(id -u) -ne 0 ]; then if [ -z "$g_shorewalldir" -o "$g_shorewalldir" = /etc/$g_program ]; then - startup_error "Ordinary users may not compile the /etc/$g_program configuration" + startup_error "Ordinary users may not $COMMAND the $CONFDIR/$g_program configuration" fi fi # @@ -413,7 +414,7 @@ compiler() { shift shorewallrc=${g_basedir}/shorewallrc - + if [ -n "$g_export" ]; then shorewallrc1=$(find_file shorewallrc) [ -f "$shorewallrc1" ] || fatal_error "Compiling for export requires a shorewallrc file"