Bug #13258


secret menu option 100

Added by → luckman212 2 months ago. Updated about 2 months ago.

Pull Request Review
Console Menu
Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:


I was poking around in /etc/rc.initial to try to fix something else and I noticed a hidden menu item 100

This opens the text-based links browser. Neat.

I guess that could be useful, but the code below looks a little silly and is incorrect. It just greps config.xml and if the string https is anywhere in there (which it's likely to be) then the browser tries to open https://localhost which is also very likely to be incorrect (maybe we're running on port 4443?).

65   CONFIG="/cf/conf/config.xml" 
66   WORD="https" 
257  100)
258      if grep "$WORD" "$CONFIG"; then
259          links "https://localhost" 
260      else
261          links "http://localhost" 
262      fi
263      ;;

I think this should either be removed or changed to open e.g. or

Actions #1

Updated by Marcos M 2 months ago

I can't think of any benefit from fixing it; better to remove it.

Actions #3

Updated by Jim Pingle 2 months ago

I haven't used links against in the GUI in quite some time so I'm not sure if it still works. If it does we may as well fix the code there. If not we can remove it.

The code can be changed to read the specific tag from the config rather than using grep, the grep method is quite outdated.

    protocol=`/usr/local/sbin/ string system/webgui/protocol`
    if [ "${protocol}" = "https" ]; then
        links "https://localhost" 
        links "http://localhost" 

Can't use the value of protocol directly as it may not be present in the configuration.

Actions #4

Updated by → luckman212 2 months ago

Ok I updated the PR to bring back the hidden option 100 / links browser. I think this is good. Unfortunately when I tested it, I was able to get to a login page, and successfully authenticated (saw that message on the console) but the dashboard never loaded. Regardless, that's for another issue -- hopefully this is good for now.

    protocol=$(/usr/local/sbin/ string system/webgui/protocol)
    port=$(/usr/local/sbin/ string system/webgui/port)
    if [ -z "$port" ]; then
        case $protocol in
            https) port=443;;
            *)     port=80;;
    links "${protocol}://localhost:${port}" 
Actions #5

Updated by Jim Pingle 2 months ago

  • Status changed from New to Pull Request Review
  • Assignee set to Jim Pingle
  • Target version set to 2.7.0
  • Plus Target Version set to 22.09
Actions #6

Updated by → luckman212 2 months ago

  • removed case 111)
  • consistency of single/double quotes
  • removed a couple of stray ; s
Actions #7

Updated by Jim Pingle about 2 months ago

  • Plus Target Version changed from 22.09 to 22.11

Also available in: Atom PDF