aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-12-13 15:37:20 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-12-13 22:25:55 +0100
commit0fab371d1a9ec5f8110620d103516ab03a1e3d1f (patch)
treef6d2fd19c632072d97af75488b941bb95f30e19b
parent40dea016700fd88bfee2838d740d46517f677601 (diff)
global-functions: $DeviceInfo: show license level if available
This now shows license level for CHR. The property is named different for Routerboards. As these have the license bundled to hardware anyway we do not show it there.
-rw-r--r--global-functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index 7c34a5c..ba83bcb 100644
--- a/global-functions
+++ b/global-functions
@@ -201,6 +201,7 @@
:do {
:set RouterBoard [ / system routerboard get ];
} on-error={ }
+ :local License [ / system license get ];
:local Update [ / system package update get ];
:return ( \
@@ -212,6 +213,8 @@
[ $IfThenElse ([ :len ($RouterBoard->"revision") ] > 0) \
(" " . $RouterBoard->"revision") ] . \
"\nSerial number: " . $RouterBoard->"serial-number") ] . \
+ [ $IfThenElse ([ :len ($License->"level") ] > 0) \
+ ("\nLicense: " . $License->"level") ] . \
"\nRouterOS:" . \
"\n Channel: " . $Update->"channel" . \
"\n Installed: " . $Update->"installed-version" . \