[Unit]
Description=lvm-devices-import to create system.devices
+ConditionPathExists=!/etc/lvm/devices/system.devices
# /run/lvm/lvm-devices-import created by vgchange -aay <rootvg>
[Path]
PathExists=/run/lvm/lvm-devices-import
Unit=lvm-devices-import.service
-ConditionPathExists=!/etc/lvm/devices/system.devices
[Install]
WantedBy=multi-user.target
[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