mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Add -t option to timestamp progress messages
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3487 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
4216c2c373
commit
231845e6d9
@ -76,3 +76,5 @@ Changes in 3.1.x.
|
||||
33) Remove superfluous rules in MAC validation.
|
||||
|
||||
34) Correct Makefile.
|
||||
|
||||
35) Add -t option
|
||||
|
@ -87,17 +87,32 @@ list_count() {
|
||||
#
|
||||
progress_message() # $* = Message
|
||||
{
|
||||
[ $VERBOSE -gt 1 ] && echo "$@"
|
||||
local timestamp=
|
||||
|
||||
if [ $VERBOSE -gt 1 ]; then
|
||||
[ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) "
|
||||
echo "${timestamp}$@"
|
||||
fi
|
||||
}
|
||||
|
||||
progress_message2() # $* = Message
|
||||
{
|
||||
[ $VERBOSE -gt 0 ] && echo "$@"
|
||||
local timestamp=
|
||||
|
||||
if [ $VERBOSE -gt 0 ]; then
|
||||
[ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) "
|
||||
echo "${timestamp}$@"
|
||||
fi
|
||||
}
|
||||
|
||||
progress_message3() # $* = Message
|
||||
{
|
||||
[ $VERBOSE -ge 0 ] && echo "$@"
|
||||
local timestamp=
|
||||
|
||||
if [ $VERBOSE -ge 0 ]; then
|
||||
[ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) "
|
||||
echo "${timestamp}$@"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -1294,7 +1294,7 @@ help()
|
||||
#
|
||||
usage() # $1 = exit status
|
||||
{
|
||||
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v ] <command>"
|
||||
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v ] [ -t ] <command>"
|
||||
echo "where <command> is one of:"
|
||||
echo " add <interface>[:<host-list>] ... <zone>"
|
||||
echo " allow <address> ..."
|
||||
@ -1417,6 +1417,7 @@ FAST=
|
||||
VERBOSE=0
|
||||
NOROUTES=
|
||||
EXPORT=
|
||||
export TIMESTAMP=
|
||||
noroutes=
|
||||
|
||||
finished=0
|
||||
@ -1474,6 +1475,10 @@ while [ $finished -eq 0 ]; do
|
||||
NOROUTES=Yes
|
||||
option=${option#n}
|
||||
;;
|
||||
t*)
|
||||
TIMESTAMP=Yes
|
||||
option=${option#t}
|
||||
;;
|
||||
-)
|
||||
finished=1
|
||||
option=
|
||||
@ -1529,7 +1534,6 @@ else
|
||||
fi
|
||||
|
||||
ensure_config_path
|
||||
|
||||
export CONFIG_PATH
|
||||
|
||||
get_config
|
||||
|
Loading…
Reference in New Issue
Block a user