diff options
Diffstat (limited to 'modules.d/slx-dmsetup/module-setup.sh')
-rwxr-xr-x | modules.d/slx-dmsetup/module-setup.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules.d/slx-dmsetup/module-setup.sh b/modules.d/slx-dmsetup/module-setup.sh index e478a5f7..3bbbd8f3 100755 --- a/modules.d/slx-dmsetup/module-setup.sh +++ b/modules.d/slx-dmsetup/module-setup.sh @@ -6,9 +6,18 @@ depends() { echo "haveged slx-tools" } install() { - inst "$moddir/scripts/dmsetup-slx-device" "/usr/local/bin/dmsetup-slx-device" + inst "$moddir/hooks/dmsetup-slx-device" "/usr/local/bin/dmsetup-slx-device" - inst_hook pre-pivot 00 "$moddir/scripts/grow-rootfs.sh" + # Grows the rootfs to match the underlying blockdev + _name="s3-grow-rootfs" + inst "$moddir/hooks/${_name}.sh" \ + "/usr/local/bin/${_name}.sh" + inst_simple "${moddir}/services/${_name}.service" \ + "${systemdsystemunitdir}/${_name}.service" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/initrd.target.requires" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/initrd.target.requires/${_name}.service" inst_multiple blockdev xxd \ mkfs.ext4 resize2fs \ |