Page 1 of 1

CHR routerboard command not availble anymore

Posted: Mon Apr 15, 2024 10:36 am
by lijo
The company I work for uses alot of scripts across both CHRs and routerboards. To validate if the script is currently running on a CHR or a routerboard we have always used the "/system routerboard get routerboard" command.
It seems like that this has been removed in CHRs on ROS7. In ROS6 it would always generate false/true based on if it was a CHR or a routerboard.

Does anyone know if this will be brought back in ROS7 or if there is a better way to accomplish it?
I have not been able to find any information why this was removed from ROS7 CHRs.

If you want to test it on your own device you can run:
:local test [/system routerboard get routerboard]; :put $test

Re: CHR routerboard command not availble anymore  [SOLVED]

Posted: Mon Apr 15, 2024 4:58 pm
by baragoon
/system/resource get board-name

Re: CHR routerboard command not availble anymore

Posted: Mon Apr 15, 2024 10:08 pm
by lijo
/system/resource get board-name
Works good enough, thank you!
Sad that the menu was removed, even though it was completely empty. It was nice to have a simple bool to check.

Re: CHR routerboard command not availble anymore

Posted: Mon Apr 15, 2024 10:11 pm
by rextended
No logic on check what do not exist.

true when is a routerboard
:put ([/system resource get board-name] != "CHR")

Re: CHR routerboard command not availble anymore

Posted: Mon Jun 10, 2024 5:51 pm
by alebu
No logic on check what do not exist.

true when is a routerboard
:put ([/system resource get board-name] != "CHR")
From RouterOS 7.15 system resource get board-name includes also the virtualization platform like "CHR VMware, Inc. VMware Virtual Platform", so I've update the check in this way.

true when is a routerboard
:put ("ABC" . [:find [/system resource get board-name] "CHR"] . "DEF"="ABCDEF")

Re: CHR routerboard command not availble anymore

Posted: Tue Jun 11, 2024 9:45 am
by rextended
No logic on check what do not exist.

true when is a routerboard
:put ([/system resource get board-name] != "CHR")
From RouterOS 7.15 system resource get board-name includes also the virtualization platform like "CHR VMware, Inc. VMware Virtual Platform", so I've update the check in this way.

true when is a routerboard
:put ("ABC" . [:find [/system resource get board-name] "CHR"] . "DEF"="ABCDEF")

No logic to add something instead of just check...

true when is a routerboard
:put ([/system resource get board-name] ~ "CHR")

(on my case is "CHR VMware, Inc. VMware Virtual Platform")