From 0c111a2ebe4ffbd070e34c47c836f42cd75c32f8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 8 Sep 2020 17:16:51 +0200 Subject: doc/mode-button: add code to check for support --- doc/mode-button.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/mode-button.md b/doc/mode-button.md index 0007481..6469e54 100644 --- a/doc/mode-button.md +++ b/doc/mode-button.md @@ -14,6 +14,20 @@ The hardware needs to have a mode button, see can configure the reset button to act the same, see `/ system routerboard reset-button`. +Copy this code to terminal to check: + +``` +:if ([ :len [ /system routerboard mode-button print as-value ] ] > 0) do={ + :put "Mode button is supported."; +} else={ + :if ([ :len [ /system routerboard reset-button print as-value ] ] > 0) do={ + :put "Mode button is not supported, but reset button is."; + } else={ + :put "Neither mode button nor reset button is supported."; + } +} +``` + Requirements and installation ----------------------------- -- cgit v1.2.3-54-g00ecf