reload-udev-rules: Ensure rules.d directory exists
The `/run/udev/rules.d` directory may not always exist, especially at boot. We need to ensure that it does before we try to copy rules exported by containers into it, or the unit will fail.master
parent
714df85183
commit
ec4b640170
|
@ -3,6 +3,7 @@ ConditionDirectoryNotEmpty=/run/containers/udev-rules
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/mkdir -p /run/udev/rules.d
|
||||
ExecStart=/bin/sh -c 'cp /run/containers/udev-rules/*.rules /run/udev/rules.d/'
|
||||
ExecStart=/usr/bin/udevadm control --reload
|
||||
ExecStart=/usr/bin/udevadm trigger
|
||||
|
|
Loading…
Reference in New Issue