mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-24 21:04:28 +02:00
global-functions: $DeviceInfo: show commit id (if available)
This commit is contained in:
parent
5715bc7b57
commit
584e507fd1
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
:local ScriptName [ :jobname ];
|
||||
|
||||
# expected configuration version
|
||||
:global CommitId "unknown";
|
||||
:global ExpectedConfigVersion 133;
|
||||
|
||||
# global variables not to be changed by user
|
||||
|
@ -284,6 +285,7 @@
|
|||
|
||||
# get readable device info
|
||||
:set DeviceInfo do={
|
||||
:global CommitId;
|
||||
:global ExpectedConfigVersion;
|
||||
:global Identity;
|
||||
|
||||
|
@ -324,6 +326,8 @@
|
|||
$RouterBoard->"current-firmware" != $RouterBoard->"upgrade-firmware") \
|
||||
([ $FormatLine " Firmware" ($RouterBoard->"current-firmware") ] . "\n") ] . \
|
||||
"RouterOS-Scripts:\n" . \
|
||||
[ $IfThenElse ($CommitId != "unknown") \
|
||||
([ $FormatLine " Commit" [ :pick $CommitId 0 8 ] ] . "\n") ] . \
|
||||
[ $FormatLine " Version" $ExpectedConfigVersion ]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue