@@ -87,13 +87,10 if [ "$ENABLE_INITRAMFS" = true ] ; then | |||||
87 | # Dummy mapping required by mkinitramfs |
|
87 | # Dummy mapping required by mkinitramfs | |
88 | echo "0 1 crypt $(echo "${CRYPTFS_CIPHER}" | cut -d ':' -f 1) ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0 7:0 4096" | chroot_exec dmsetup create "${CRYPTFS_MAPPING}" |
|
88 | echo "0 1 crypt $(echo "${CRYPTFS_CIPHER}" | cut -d ':' -f 1) ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 0 7:0 4096" | chroot_exec dmsetup create "${CRYPTFS_MAPPING}" | |
89 |
|
89 | |||
90 | # Generate initramfs with encrypted root partition support |
|
|||
91 | chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" |
|
|||
92 |
|
||||
93 | # Remove dummy mapping |
|
90 | # Remove dummy mapping | |
94 | chroot_exec cryptsetup close "${CRYPTFS_MAPPING}" |
|
91 | chroot_exec cryptsetup close "${CRYPTFS_MAPPING}" | |
95 | else |
|
|||
96 | # Generate initramfs without encrypted root partition support |
|
|||
97 | chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" |
|
|||
98 | fi |
|
92 | fi | |
|
93 | ||||
|
94 | # Generate initramfs | |||
|
95 | chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}" | |||
99 | fi |
|
96 | fi |
@@ -179,26 +179,26 if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then | |||||
179 | # Copy downloaded systemd-swap sources |
|
179 | # Copy downloaded systemd-swap sources | |
180 | mv "${temp_dir}/systemd-swap" "${R}/tmp/" |
|
180 | mv "${temp_dir}/systemd-swap" "${R}/tmp/" | |
181 |
|
181 | |||
182 | # Set permissions of the systemd-swap sources |
|
|||
183 | chown -R root:root "${R}/tmp/systemd-swap" |
|
|||
184 |
|
||||
185 | # Remove temporary directory for systemd-swap sources |
|
|||
186 | rm -fr "${temp_dir}" |
|
|||
187 |
|
||||
188 | # Change into downloaded src dir |
|
182 | # Change into downloaded src dir | |
189 | cd "${R}/tmp/systemd-swap" || exit |
|
183 | cd "${R}/tmp/systemd-swap" || exit | |
190 |
|
184 | |||
191 | # Build package |
|
185 | # Build package | |
192 | bash ./package.sh debian |
|
186 | bash ./package.sh debian | |
|
187 | ||||
|
188 | # Change back into script root dir | |||
|
189 | cd "${WORKDIR}" || exit | |||
|
190 | ||||
|
191 | # Set permissions of the systemd-swap sources | |||
|
192 | chown -R root:root "${R}/tmp/systemd-swap" | |||
193 |
|
193 | |||
194 | # Install package |
|
194 | # Install package | |
195 | chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap_*_any.deb |
|
195 | chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap_*_any.deb | |
196 |
|
196 | |||
197 | # Enable service |
|
197 | # Enable service | |
198 | chroot_exec systemctl enable systemd-swap |
|
198 | chroot_exec systemctl enable systemd-swap | |
199 |
|
199 | |||
200 | # Change back into script root dir |
|
200 | # Remove temporary directory for systemd-swap sources | |
201 | cd "${WORKDIR}" || exit |
|
201 | rm -fr "${temp_dir}" | |
202 | else |
|
202 | else | |
203 | # Enable ZSWAP in cmdline if systemd-swap is not used |
|
203 | # Enable ZSWAP in cmdline if systemd-swap is not used | |
204 | if [ "$KERNEL_ZSWAP" = true ] ; then |
|
204 | if [ "$KERNEL_ZSWAP" = true ] ; then |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant