FS#31623 - [netcfg] change menu behavior
Attached to Project:
Arch Linux
Opened by Xyne (Xyne) - Thursday, 20 September 2012, 19:15 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 30 April 2013, 01:06 GMT
Opened by Xyne (Xyne) - Thursday, 20 September 2012, 19:15 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 30 April 2013, 01:06 GMT
|
Details
The current version of netcfg-menu allows the user to select
a single entry via "dialog --menu". I think it would be more
useful to use "dialog --checklist".
Each checklist item includes a status field that determines the default status of the item (on or off). This could be set in the loop on line 20 of netcfg-menu using values in /var/lib/netcfg/netcfg.state. This would essentially act as a combination of the "menu" and "last" options in netcfg when the menu timeout is set (see The main advantages of the checklist are that multiple profiles can be selected at boot and that the last state is on by default, which will often be what the user wants when the menu times out. For this to work, the following changes would be required: * netcfg-menu would have to save the state when successful * netcfg-menu would have to load the state before creating the "profiles" array for "dialog" * the "profiles" array would require an extra status field for each entry determined by the last state * the "default" option would be removed (if no previous state is found then any profile named "main" can have its status set to "on") I started to make the changes in order to submit a patch, but I want to check if it is ok to re-use the state file /var/lib/netcfg/netcfg.state for this purpose. Currently only the daemon manipulates that file. |
This task depends upon
Closed by Eric Belanger (Snowman)
Tuesday, 30 April 2013, 01:06 GMT
Reason for closing: Won't implement
Additional comments about closing: netcfg has been moved to AUR
Tuesday, 30 April 2013, 01:06 GMT
Reason for closing: Won't implement
Additional comments about closing: netcfg has been moved to AUR
That said, netcfg-menu on boot is a dead end. It is not supported on systemd systems and probably never will. If you come up with a nice patch, I might merge it, but I am not going to write anything myself.
Even if dialogs are no longer supported at startup, they are useful for quickly changing profiles. The advantage of the checklist is that a user can change multiple profiles at once, e.g. wired and wireless. I don't think this or netcfg-menu is a dead end. They just need to be cleaned up at some point to remove the last remnants of the old daemon output.
Thanks.
[1] http://xyne.archlinux.ca/tmp/netcfg-checklist