From 9c04128352e8cdd901a2232e35cdd18fd028033d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Jan 2024 14:04:14 +0100 Subject: [slx-dmsetup] Only grow rootfs if we don't do it in stage4 --- modules.d/slx-dmsetup/module-setup.sh | 4 ++-- modules.d/slx-dmsetup/services/s3-grow-rootfs.service | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules.d/slx-dmsetup/module-setup.sh b/modules.d/slx-dmsetup/module-setup.sh index 3bbbd8f3..99c1adf2 100755 --- a/modules.d/slx-dmsetup/module-setup.sh +++ b/modules.d/slx-dmsetup/module-setup.sh @@ -15,9 +15,9 @@ install() { inst_simple "${moddir}/services/${_name}.service" \ "${systemdsystemunitdir}/${_name}.service" mkdir --parents \ - "${initdir}/${systemdsystemunitdir}/initrd.target.requires" + "${initdir}/${systemdsystemunitdir}/initrd.target.wants" ln_r "${systemdsystemunitdir}/${_name}.service" \ - "${systemdsystemunitdir}/initrd.target.requires/${_name}.service" + "${systemdsystemunitdir}/initrd.target.wants/${_name}.service" inst_multiple blockdev xxd \ mkfs.ext4 resize2fs \ diff --git a/modules.d/slx-dmsetup/services/s3-grow-rootfs.service b/modules.d/slx-dmsetup/services/s3-grow-rootfs.service index a849f4a3..5cb42056 100644 --- a/modules.d/slx-dmsetup/services/s3-grow-rootfs.service +++ b/modules.d/slx-dmsetup/services/s3-grow-rootfs.service @@ -1,5 +1,7 @@ [Unit] Description=Grow size of rootfs to underlying block device +# If we have a growfs service in stage4, we don't do anything here +ConditionPathExists=!/sysroot/etc/systemd/system/grow-rootfs.service # For ext4, -root-device would be sufficient, but XFS tool needs mountpoint After=initrd-root-fs.target Before=initrd-switch-root.target -- cgit v1.2.3-55-g7522