PATH_HOSTS=/etc/hosts
PATH_INTERFACES=/etc/network/interfaces
PATH_NM_CONNECTIONS=/etc/NetworkManager/system-connections
+PATH_RESUME_CONF=/etc/initramfs-tools/conf.d/resume
# constants we might want to change at some point
DEB_SUITE=trixie
PATH_MNT_NM_CONN="${PATH_MNT_CHROOT}${PATH_NM_CONNECTIONS}/${FNAME_NM_CONN}"
PATH_MNT_NM_CONNECTIONS="${PATH_MNT_CHROOT}${PATH_NM_CONNECTIONS}"
PATH_MNT_PROFILE="${PATH_MNT_CHROOT}${PATH_HOME_ROOT}/${FNAME_PROFILE}"
+PATH_MNT_RESUME_CONF="${PATH_MNT_CHROOT}${PATH_RESUME_CONF}"
PATH_VG=$(path_vg "${NAME_LUKSVG}")
# shellcheck disable=SC2034
# (used only inside templates/fstab, rendered via render_template)
PATH_VG_DATA=${PATH_VG}/${NAME_DATA}
PATH_VG_ROOT=${PATH_VG}/${NAME_ROOT}
-# shellcheck disable=SC2034
-# (used only inside templates/fstab, rendered via render_template)
PATH_VG_SWAP=${PATH_VG}/${NAME_SWAP}
# sanity checks
disable_apt_recommends "${PATH_MNT_CHROOT}"
+msg 'Setting up hibernation resume-from-swap config …'
+mkdir -p "$(dirname "${PATH_MNT_RESUME_CONF}")"
+printf 'RESUME=%s\n' "${PATH_VG_SWAP}" >| "${PATH_MNT_RESUME_CONF}"
+
msg 'Into chroot environment installing LVM tools, kernel, initrd etc. …'
chroot_sh "apt-get -qq update"
chroot_sh \