From cba33dd4e15aec1c528e549fb0a7142574880308 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 31 Aug 2005 21:31:23 +0000 Subject: [PATCH] Import tc4shorewall into project git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2611 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 4 ++-- Shorewall/tcstart | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index da296c28c..7825b655c 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -3346,12 +3346,12 @@ setup_tc1() { f=$(find_file tcstart) - if [ -f $f ]; then + if [ -x $f ]; then run_user_exit tcstart save_progress_message "Restoring Traffic Control..." - save_command . $(find_file tcstart) + save_command $(find_file tcstart) fi } diff --git a/Shorewall/tcstart b/Shorewall/tcstart index e56679c6c..05a50039e 100755 --- a/Shorewall/tcstart +++ b/Shorewall/tcstart @@ -12,6 +12,14 @@ if [ -z "$COMMAND" ]; then . $FUNCTIONS +elif [ "$COMMAND" = restore ]; then + cd /etc/shorewall + SHOREWALL_DIR=. +fi + +if [ -z "$COMMAND" -o "$COMMAND" = restore ]; then + run_tc() { tc $@; } + fatal_error() { echo " ERROR: $@" >&2; exit 2; } TMP_DIR= TMP_DIR=$(mktempdir) fi