From 1a81d60fec0b918649d7657a936f4c08345b006d 2018-12-05 12:59:16 From: Unknown Date: 2018-12-05 12:59:16 Subject: [PATCH] a --- diff --git a/bootstrap.d/14-fstab.sh b/bootstrap.d/14-fstab.sh index 4ecba25..05b648e 100644 --- a/bootstrap.d/14-fstab.sh +++ b/bootstrap.d/14-fstab.sh @@ -87,13 +87,10 @@ if [ "$ENABLE_INITRAMFS" = true ] ; then # Dummy mapping required by mkinitramfs echo "0 1 crypt $(echo "${CRYPTFS_CIPHER}" | cut -d ':' -f 1) ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0 7:0 4096" | chroot_exec dmsetup create "${CRYPTFS_MAPPING}" - # Generate initramfs with encrypted root partition support - chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" - # Remove dummy mapping chroot_exec cryptsetup close "${CRYPTFS_MAPPING}" - else - # Generate initramfs without encrypted root partition support - chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" fi + + # Generate initramfs + chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" fi diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index b798977..18f34b3 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -179,26 +179,26 @@ if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then # Copy downloaded systemd-swap sources mv "${temp_dir}/systemd-swap" "${R}/tmp/" - # Set permissions of the systemd-swap sources - chown -R root:root "${R}/tmp/systemd-swap" - - # Remove temporary directory for systemd-swap sources - rm -fr "${temp_dir}" - # Change into downloaded src dir cd "${R}/tmp/systemd-swap" || exit # Build package bash ./package.sh debian + + # Change back into script root dir + cd "${WORKDIR}" || exit + + # Set permissions of the systemd-swap sources + chown -R root:root "${R}/tmp/systemd-swap" # Install package chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap_*_any.deb # Enable service chroot_exec systemctl enable systemd-swap - - # Change back into script root dir - cd "${WORKDIR}" || exit + + # Remove temporary directory for systemd-swap sources + rm -fr "${temp_dir}" else # Enable ZSWAP in cmdline if systemd-swap is not used if [ "$KERNEL_ZSWAP" = true ] ; then