Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

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
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No


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  FS#31622 ). Whichever profiles the user last set via the menu would be selected by default.

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
Comment by Jouke Witteveen (jouke) - Friday, 21 September 2012, 08:32 GMT
Currently, netcfg-menu defaults to a profile called 'main'. I'm okay with changing this default to the last profile used (the state file is indeed reusable for this). I don't see the need for a checklist instead of a menu with a default.

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.
Comment by Xyne (Xyne) - Sunday, 25 November 2012, 22:45 GMT
Here's a modified version of netcfg-menu aptly named netcfg-checklist.[1] It can live alongside netcfg-menu and I hope that you will include it in the package. With systemd there is no need to support this in /etc/conf.d/netcfg, so all you need to do is install netcfg-checklist on the path.

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.


Comment by Xyne (Xyne) - Tuesday, 27 November 2012, 00:37 GMT
Bumping to say that the file on the site has been updated (the DEFAULT profile would be started when trying to shut down all profiles).