rfkill: don't fail if the device cannot be initialized in time#6528
rfkill: don't fail if the device cannot be initialized in time#6528sfanxiang wants to merge 1 commit intosystemd:masterfrom
Conversation
Currently rfkill load/save fails when wait_for_initialized() returns an error. It would be more reasonable to fall back to a generic state file in this situation.
|
I'm not convinced this is the right change. Why should we want to set rfkill state for a device which doesn't exist (or at least udev doesn't know about)? Is there a specific situation you are trying to fix? |
|
@keszybz |
|
When would polling udev fail? |
|
@keszybz Is it possible that a device is created, but not initializable? |
|
This appears strange to me, too. is it possible that you have some rfkill devices that are not marked with any property or tag or so? udev will not report them as initialized ever, as you appear to have found out in PR #6551... So far we assumed the right fix would be to add the a property to make sure this pitfall isn't an issue. Also see: 32eae3c Did you drop that udev rule from one of your devices? how can it happen that your rfkill device is never reported initialized by udev? |
|
@poettering |
Ah, ouch! Can you prep a patch that splits the rule in two, so that the SYSTEMD_RFKILL env var is applied even if the path_id part fails? |
This patch makes sure both rules are applied to rfkill devices. Otherwise the ENV rule may be skipped if path_id fails. Fixes: systemd#6528
|
Will this do? #6556 |
This patch makes sure both rules are applied to rfkill devices. Otherwise the ENV rule may be skipped if path_id fails. Fixes: #6528
Yes it will! Thanks! |
This patch makes sure both rules are applied to rfkill devices. Otherwise the ENV rule may be skipped if path_id fails. Fixes: systemd#6528
This patch makes sure both rules are applied to rfkill devices. Otherwise the ENV rule may be skipped if path_id fails. Fixes: systemd#6528
Currently rfkill load/save fails when wait_for_initialized() returns an
error. It would be more reasonable to fall back to a generic state file
in this situation.