diff options
-rwxr-xr-x | modules.d/slx-dmsetup/module-setup.sh | 1 | ||||
-rw-r--r-- | modules.d/slx-dmsetup/scripts/generate-fstab-swap.sh | 33 |
2 files changed, 0 insertions, 34 deletions
diff --git a/modules.d/slx-dmsetup/module-setup.sh b/modules.d/slx-dmsetup/module-setup.sh index e8e516f8..e478a5f7 100755 --- a/modules.d/slx-dmsetup/module-setup.sh +++ b/modules.d/slx-dmsetup/module-setup.sh @@ -8,7 +8,6 @@ depends() { install() { inst "$moddir/scripts/dmsetup-slx-device" "/usr/local/bin/dmsetup-slx-device" - inst_hook pre-pivot 10 "$moddir/scripts/generate-fstab-swap.sh" inst_hook pre-pivot 00 "$moddir/scripts/grow-rootfs.sh" inst_multiple blockdev xxd \ diff --git a/modules.d/slx-dmsetup/scripts/generate-fstab-swap.sh b/modules.d/slx-dmsetup/scripts/generate-fstab-swap.sh deleted file mode 100644 index bb37d6cf..00000000 --- a/modules.d/slx-dmsetup/scripts/generate-fstab-swap.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# -# Script to create stage4's fstab entry for swap devices -# -# Will use swap partitions of MBR's type '82' or -# GPT UUID '0657fd6d-a4ab-43c4-84e5-0933c84b4f4f' -# -. /etc/openslx - -for swap_dev in \ - $(slx-tools dev_find_partitions "82" "0657fd6d-a4ab-43c4-84e5-0933c84b4f4f"); do - - [ -z "$swap_dev" ] && continue - - # Generate swap fstab entry for NEWROOT. Use priority 10 to prefer zram - echo -e "$swap_dev\tswap\t\tswap\t\tx-systemd.makefs,pri=10\t0\t0" \ - >> "$NEWROOT/etc/fstab" - - # check if configured not to wipe any existing filesystem - [ "$SLX_WIPE_SWAP_DEVICE" = "yes" ] || continue - - # create a drop-in to wipe the device's filesystem - swap_dev_systemd_escaped="$(tr '/' '-' <<< ${swap_dev:1})" - base_dir="$NEWROOT/etc/systemd/system" - dropin_dir="$base_dir/systemd-mkswap@${swap_dev_systemd_escaped}.service.d" - mkdir -p "$dropin_dir" - cat <<- EOF > "$dropin_dir/wipefs.conf" - [Service] - ExecStartPre=/sbin/wipefs -a %f - EOF -done - -true |