From 763f8fb36a08015bb3454ca4411de951e3f513fc Mon Sep 17 00:00:00 2001 From: Waverider Date: Wed, 3 Jul 2024 10:47:21 -0400 Subject: [PATCH 1/2] fix `sed -e unterminated `s' command` error --- hibernator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernator b/hibernator index 44e8f0a..654a16a 100644 --- a/hibernator +++ b/hibernator @@ -63,7 +63,7 @@ resume_boot_option() { } grub_resume_boot_option() { - grub_root_part=$(find /dev/disk/ | grep "$(awk '$2~/^\/$/ {print $1}' /etc/fstab | cut -d= -f 2)") + grub_root_part=$(echo "$(find /dev/disk/ | grep "$(awk '$2~/^\/$/ {print $1}' /etc/fstab | cut -d= -f 2)")" | head -n1) grub_swap_part=$(find /dev/disk/ | grep "$(awk '$3=="swap" {print $1; exit}' /etc/fstab | cut -d= -f 2)") if [[ -f /swapfile ]]; then echo "resume=$grub_root_part resume_offset=$(hibernate_offset)" From fbab1f3333248c3e8ddd67af02b21aec4d4e4412 Mon Sep 17 00:00:00 2001 From: Waverider <33787286+liaminventions@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:49:55 -0400 Subject: [PATCH 2/2] Update hibernator --- hibernator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernator b/hibernator index 654a16a..40a09fa 100644 --- a/hibernator +++ b/hibernator @@ -63,7 +63,7 @@ resume_boot_option() { } grub_resume_boot_option() { - grub_root_part=$(echo "$(find /dev/disk/ | grep "$(awk '$2~/^\/$/ {print $1}' /etc/fstab | cut -d= -f 2)")" | head -n1) + grub_root_part=$(echo "$(find /dev/disk/ | grep "$(awk '$2~/^\/$/ {print $1}' /etc/fstab | cut -d= -f 2)")" | head -n1) grub_swap_part=$(find /dev/disk/ | grep "$(awk '$3=="swap" {print $1; exit}' /etc/fstab | cut -d= -f 2)") if [[ -f /swapfile ]]; then echo "resume=$grub_root_part resume_offset=$(hibernate_offset)"