mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-05 05:01:29 +00:00
rules: mark loop device as SYSTEMD_READY=0 if no file is attached
Check existence of loop/backing_file in sysfs and mark loop devices with SYSTEMD_READY if missing. Such loop files is uninitialized and it's not ready for use yet (there's no file attached). (cherry picked from commitebc54302d7) (cherry picked from commit28be65e120)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
cb0f609a27
commit
2522b82b1e
@@ -22,6 +22,9 @@ SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_T
|
||||
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
|
||||
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
|
||||
|
||||
# Ignore loop devices that don't have any file attached
|
||||
SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
|
||||
|
||||
# Ignore nbd devices in the "add" event, with "change" the nbd is ready
|
||||
ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user