mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-03 09:44:33 +02:00
global-functions: $DeviceInfo: handle configuration version
This commit is contained in:
parent
94581741f4
commit
2258087aab
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#!rsc
|
||||
# RouterOS script: global-functions
|
||||
# Copyright (c) 2013-2019 Christian Hesse <mail@eworm.de>
|
||||
# Michael Gisbers <michael@gisbers.de>
|
||||
#
|
||||
# global functions
|
||||
|
||||
|
@ -297,6 +298,8 @@
|
|||
|
||||
# get readable device info
|
||||
:global DeviceInfo do={
|
||||
:global ExpectedConfigVersion;
|
||||
:global GlobalConfigVersion;
|
||||
:global Identity;
|
||||
|
||||
:local BoardName [ / system resource get board-name ];
|
||||
|
@ -320,6 +323,13 @@
|
|||
:set Info ($Info . "\n" . \
|
||||
" Available: " . $Update->"latest-version");
|
||||
}
|
||||
:set Info ($Info . "\n" . \
|
||||
"RouterOS-Scripts Configuration Version:\n" . \
|
||||
" Current: " . $GlobalConfigVersion);
|
||||
:if ($GlobalConfigVersion != $ExpectedConfigVersion) do={
|
||||
:set Info ($Info . "\n" . \
|
||||
" Expected: " . $ExpectedConfigVersion);
|
||||
}
|
||||
|
||||
:return $Info;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue