From 0fab371d1a9ec5f8110620d103516ab03a1e3d1f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 13 Dec 2021 15:37:20 +0100 Subject: 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. --- global-functions | 3 +++ 1 file changed, 3 insertions(+) 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" . \ -- cgit v1.2.3-54-g00ecf