Comment 20 for bug 1073669

Revision history for this message
Stéphane Graber (stgraber) wrote :

Those events come from the udev bridge, the two you're interested in are:
 - net-device-added
 - bluetooth-device-added

My idea was roughly to change /etc/init/rfkill-restore.conf with:
 - start on local-filesystems or (local-filesystems and net-device-added) or (local-filesystems and bluetooth-device-added)
 - Add a line after the echo, doing "touch /run/rfkill.$1.done"
 - Change the if statement not to trigger if /run/rfkill.$1.done exists

This should make the job trigger once at boot time and again every time a device appears on the system, the entry in /run will be there to avoid restoring the original state of all devices every time a new device shows up. /run being on tmpfs, it won't be persistent across reboots.