mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-30 15:54:56 +02:00
global-functions: $DeviceInfo: also show commit info
This commit is contained in:
parent
dafcc1a0cb
commit
75633872aa
1 changed files with 4 additions and 2 deletions
|
@ -12,8 +12,9 @@
|
|||
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
# expected configuration version
|
||||
# Git commit id & info, expected configuration version
|
||||
:global CommitId "unknown";
|
||||
:global CommitInfo "unknown";
|
||||
:global ExpectedConfigVersion 133;
|
||||
|
||||
# global variables not to be changed by user
|
||||
|
@ -286,6 +287,7 @@
|
|||
# get readable device info
|
||||
:set DeviceInfo do={
|
||||
:global CommitId;
|
||||
:global CommitInfo;
|
||||
:global ExpectedConfigVersion;
|
||||
:global Identity;
|
||||
|
||||
|
@ -327,7 +329,7 @@
|
|||
([ $FormatLine " Firmware" ($RouterBoard->"current-firmware") ] . "\n") ] . \
|
||||
"RouterOS-Scripts:\n" . \
|
||||
[ $IfThenElse ($CommitId != "unknown") \
|
||||
([ $FormatLine " Commit" [ :pick $CommitId 0 8 ] ] . "\n") ] . \
|
||||
([ $FormatLine " Commit" ($CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . "\n") ] . \
|
||||
[ $FormatLine " Version" $ExpectedConfigVersion ]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue