Skip to content

Commit

Permalink
Merge branch 'resume'
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroReflex committed Mar 11, 2024
2 parents 4f21828 + 43fc51e commit c528274
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 @@ -394,7 +394,19 @@ main() {
fi
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 c528274

Please sign in to comment.