From 2258087aab5c94a3970685f7f25587ed5403111d Mon Sep 17 00:00:00 2001 From: Michael Gisbers Date: Thu, 12 Sep 2019 13:48:46 +0200 Subject: global-functions: $DeviceInfo: handle configuration version --- global-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global-functions b/global-functions index 87cda40..371c230 100644 --- a/global-functions +++ b/global-functions @@ -1,6 +1,7 @@ #!rsc # RouterOS script: global-functions # Copyright (c) 2013-2019 Christian Hesse +# Michael Gisbers # # 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; } -- cgit v1.2.3-70-g09d2