• I have two users (using the Access Controls plugin) and want to limit the menu items available to one user. Is there a way to set the menu up to have a login on initial boot and based on the credentials entered, limit what options are displayed? I want everything to be seen by admin users and technician users should only see Memtest and Deploy Image.

  • Senior Developer

    @jmvela2x Sorry, lost track of this.

    Here you have a template for an advanced menu:

    #!ipxe
    :ADVMENU
    menu
    colour --rgb 0x00567a 0 ||
    cpair --foreground 1 1 ||
    cpair --foreground 0 3 ||
    cpair --foreground 4 4 ||
    item item1 Do this
    item item2 Do that
    item item3 Go back to main menu
    choose --default item1 --timeout 6000 target && goto ${target}
    :item1
    echo "Do this" || goto ADVMENU
    :item2
    echo "Do that" || goto ADVMENU
    :item3
    chain -ar http://${fog-ip}/fog/service/ipxe/boot.php || goto ADVMENU
    

  • @Sebastian-Roth I’m aware of the ability to hide menu options, but there are certain things I need accessible to admins that normal users shouldn’t see. I see an Advanced Menu, but it doesn’t work how I imagined it might in that I cannot set menu items to appear there and enable it with login and only see them after selecting it. Is there a Wiki resource for the ipxe menu for 1.5.9? I have found some information, but a lot of it seems outdated at this point.

  • Senior Developer

    @jmvela2x Can’t give you a complete answer (with all the code) on how to do this but I might give you some hints. First you can hide/disable menu items. Then you’d need to create custom iPXE menu items for login and subsequent menus depending on the credentials used.

    Other than that you can modify the PHP code to achieve what you want.

285
Online

7.6k
Users

14.7k
Topics

138.3k
Posts