Retain TC_ENABLED value

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4564 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-09-10 21:19:05 +00:00
parent 375b2007fd
commit ebe5f00aab
2 changed files with 5 additions and 5 deletions

View File

@ -921,7 +921,7 @@ setup_tc1() {
if [ -n "$TC_SCRIPT" ]; then
save_progress_message "Setting up Traffic Control..."
append_file $TC_SCRIPT
elif [ -n "$TC_ENABLED" ]; then
elif [ "$TC_ENABLED" = Internal ]; then
strip_file_and_lib_load tcdevices tc
strip_file_and_lib_load tcclasses tc && setup_traffic_shaping
fi
@ -1014,7 +1014,7 @@ __EOF__
if [ -n "$TC_SCRIPT" ]; then
save_progress_message "Refreshing Traffic Shaping"
run_user_exit $TC_SCRIPT
elif [ -n "$TC_ENABLED" ]; then
elif [ "$TC_ENABLED" = Internal ]; then
[ -n "$LIB_tc_LOADED" ] && setup_traffic_shaping
fi
}
@ -5278,7 +5278,7 @@ __EOF__
# Shorewall auxiliary configuration file created by Shorewall version $VERSION - $(date)
#
__EOF__
for option in VERBOSITY LOGFILE LOGFORMAT IPTABLES PATH SHOREWALL_SHELL SUBSYSLOCK RESTOREFILE; do
for option in VERBOSITY LOGFILE LOGFORMAT IPTABLES PATH SHOREWALL_SHELL SUBSYSLOCK RESTOREFILE TC_ENABLED; do
conditionally_add_option $option
done
exec 3>&-

View File

@ -1969,12 +1969,12 @@ do_initialize() {
if [ -n "$TC_ENABLED" ] ; then
case "$TC_ENABLED" in
[Yy][Ee][Ss])
TC_ENABLED=
TC_ENABLED=Yes
TC_SCRIPT=$(find_file tcstart)
[ -f $TC_SCRIPT ] || fatal_error "Unable to find tcstart file"
;;
[Ii][Nn][Tt][Ee][Rr][Nn][Aa][Ll])
TC_ENABLED=Yes
TC_ENABLED=Internal
;;
[Nn][Oo])
TC_ENABLED=