mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-12 18:54:25 +01:00
Display compilation date/time in 'status -a' output
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
41923cb80e
commit
1308560aba
@ -753,6 +753,7 @@ version_command() {
|
||||
local all
|
||||
all=
|
||||
local product
|
||||
local compiletime
|
||||
|
||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
option=$1
|
||||
@ -795,8 +796,16 @@ version_command() {
|
||||
done
|
||||
|
||||
if [ "$(id -u)" -eq 0 -a -f $g_firewall ]; then
|
||||
echo $g_echo_n "$g_firewall was compiled by Shorewall version "
|
||||
$g_firewall version
|
||||
compiletime=$(run_it $g_firewall info 2>/dev/null)
|
||||
|
||||
case $compiletime in
|
||||
compiled\ *)
|
||||
echo "$g_firewall was $compiletime"
|
||||
;;
|
||||
*)
|
||||
echo "$g_firewall was compiled by Shorewall version $(run_it $g_firewall version))"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
echo $SHOREWALL_VERSION
|
||||
@ -3348,17 +3357,18 @@ show_status() {
|
||||
|
||||
if [ $VERBOSITY -ge 1 ]; then
|
||||
if [ -f $g_firewall ]; then
|
||||
compiletime=$($g_firewall info 2>/dev/null)
|
||||
compiletime=$(run_it $g_firewall info 2>/dev/null)
|
||||
|
||||
case $compiletime in
|
||||
compiled\ *)
|
||||
state="$state ($g_firewall $compiletime)"
|
||||
;;
|
||||
*)
|
||||
state="$state ($g_firewall compiled by Shorewall version $($g_firewall version))"
|
||||
state="$state ($g_firewall compiled by Shorewall version $(run_it $g_firewall version))"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "State:$state"
|
||||
echo
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user