FS#32421 - [rfkill] 0.4-5 systemd service file is rather useless (incl. fix)
Attached to Project:
Arch Linux
Opened by Raymond Wagenmaker (raynman) - Saturday, 03 November 2012, 12:37 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 11 November 2012, 21:58 GMT
Opened by Raymond Wagenmaker (raynman) - Saturday, 03 November 2012, 12:37 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 11 November 2012, 21:58 GMT
|
Details
Description:
The .service file that was added does more harm than good. It is set to block device index 9999 on start and unblock all devices when stopped. Perhaps the latter is a useful hack for specific hardware, but the rc script does not do that, so I assume it does not have to be in the service file either. Blocking device 9999 is useless for most users. Furthermore, because a service file generated by Arch's compatibility layer is not used if a native one exists with the same name, this breaks initscripts compatibility (if rfkill is in the DAEMONS array). Suggested fix: Remove the existing service file; then the compatibility layer should cover mixed systemd/initscripts setups. For pure systemd setups, we could use a hack with a separate script similar to what the compatibility layer does, but I suggest the two attached template service files. These allow you to block/unblock specific devices without a separate configuration file and script. It does mean you need to instantiate one unit per device (category), but that is not really a problem, especially because I expect most users (like me) only need to (un)block one or two devices. I added an ordering for the special device category 'all', so that when you enable rfkill-block@all and rfkill-unblock@wlan, the unblock unit will be started after the block unit. Conversely, you can unblock@all and block@something and these will be started in the right order. This is a small improvement over the rc script, which always does all blocking before any unblocking. |
This task depends upon
Closed by Gaetan Bisson (vesath)
Sunday, 11 November 2012, 21:58 GMT
Reason for closing: Implemented
Additional comments about closing: rfkill-0.4-6 in [testing]
Sunday, 11 November 2012, 21:58 GMT
Reason for closing: Implemented
Additional comments about closing: rfkill-0.4-6 in [testing]
rfkill-block@.service