Skip to content

Commit

Permalink
Allow resume from hibernation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroReflex committed Mar 11, 2024
1 parent e38d815 commit 43fc51e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion __frzr-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,19 @@ main() {
INTEL_UCODE="initrd /${NAME}/intel-ucode.img"
fi

ADDITIONAL_ARGUMENTS=""
RESUME_ARGS=""
if [ -f "/home/swapfile" ]; then
RESUME_OFFSET=$(btrfs inspect-internal map-swapfile -r /home/swapfile)

RESUME_DISK=$(mount | grep "/home" | awk '{print $1}')
PART_UUID=$(blkid -o value -s UUID ${RESUME_DISK})

RESUME_ARGS="resume=UUID=${PART_UUID} resume_offset=${RESUME_OFFSET}"

echo "Add resume hook to boot boot parameters: ${RESUME_ARGS}"
fi

ADDITIONAL_ARGUMENTS="${RESUME_ARGS}"
if [ -e ${SUBVOL}/usr/lib/frzr.d/bootconfig.conf ] ; then
ADDITIONAL_ARGUMENTS="$ADDITIONAL_ARGUMENTS $(cat ${SUBVOL}/usr/lib/frzr.d/bootconfig.conf)"
fi
Expand Down

0 comments on commit 43fc51e

Please sign in to comment.