diff options
author | Christian Hesse <mail@eworm.de> | 2021-12-13 15:37:20 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-12-13 22:25:55 +0100 |
commit | 0fab371d1a9ec5f8110620d103516ab03a1e3d1f (patch) | |
tree | f6d2fd19c632072d97af75488b941bb95f30e19b | |
parent | 40dea016700fd88bfee2838d740d46517f677601 (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-functions | 3 |
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" . \ |