mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-13 00:09:43 +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
|
local all
|
||||||
all=
|
all=
|
||||||
local product
|
local product
|
||||||
|
local compiletime
|
||||||
|
|
||||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||||
option=$1
|
option=$1
|
||||||
@ -795,8 +796,16 @@ version_command() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$(id -u)" -eq 0 -a -f $g_firewall ]; then
|
if [ "$(id -u)" -eq 0 -a -f $g_firewall ]; then
|
||||||
echo $g_echo_n "$g_firewall was compiled by Shorewall version "
|
compiletime=$(run_it $g_firewall info 2>/dev/null)
|
||||||
$g_firewall version
|
|
||||||
|
case $compiletime in
|
||||||
|
compiled\ *)
|
||||||
|
echo "$g_firewall was $compiletime"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$g_firewall was compiled by Shorewall version $(run_it $g_firewall version))"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo $SHOREWALL_VERSION
|
echo $SHOREWALL_VERSION
|
||||||
@ -3348,17 +3357,18 @@ show_status() {
|
|||||||
|
|
||||||
if [ $VERBOSITY -ge 1 ]; then
|
if [ $VERBOSITY -ge 1 ]; then
|
||||||
if [ -f $g_firewall ]; 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
|
case $compiletime in
|
||||||
compiled\ *)
|
compiled\ *)
|
||||||
state="$state ($g_firewall $compiletime)"
|
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
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "State:$state"
|
echo "State:$state"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user