diff --git a/scripts/lvm-devices-import.path b/scripts/lvm-devices-import.path index bcf0dcd4c..0ccead517 100644 --- a/scripts/lvm-devices-import.path +++ b/scripts/lvm-devices-import.path @@ -1,12 +1,12 @@ [Unit] Description=lvm-devices-import to create system.devices +ConditionPathExists=!/etc/lvm/devices/system.devices # /run/lvm/lvm-devices-import created by vgchange -aay [Path] PathExists=/run/lvm/lvm-devices-import Unit=lvm-devices-import.service -ConditionPathExists=!/etc/lvm/devices/system.devices [Install] WantedBy=multi-user.target diff --git a/scripts/lvm-devices-import.service b/scripts/lvm-devices-import.service index 9d3bda2ee..2917da26b 100644 --- a/scripts/lvm-devices-import.service +++ b/scripts/lvm-devices-import.service @@ -1,11 +1,11 @@ [Unit] Description=Create lvm system.devices +ConditionPathExists=!/etc/lvm/devices/system.devices [Service] Type=oneshot RemainAfterExit=no ExecStart=/usr/sbin/vgimportdevices --rootvg --auto -ConditionPathExists=!/etc/lvm/devices/system.devices [Install] WantedBy=multi-user.target