Skip to content

Commit

Permalink
Closes #234
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeansen committed Feb 28, 2021
1 parent bf71d61 commit 0a6f2ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bcrm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,10 @@ Cleanup() { #{{{
find "$MNTPNT" -xdev -depth -type d -empty ! -exec mountpoint -q {} \; -exec rmdir {} \;
rmdir "$MNTPNT"
fi
[[ $SYS_CHANGED == true ]] && systemctl --runtime unmask sleep.target hibernate.target suspend.target hybrid-sleep.target
if [[ $SYS_CHANGED == true ]]; then
systemctl --runtime unmask sleep.target hibernate.target suspend.target hybrid-sleep.target
message -i -t "Re-enabling previously deactived power management settings."
fi
lvremove -f "${VG_SRC_NAME}/$SNAP4CLONE" &>/dev/null
flock -u 200
} &>/dev/null
Expand Down Expand Up @@ -2725,6 +2728,7 @@ Main() { #{{{
#Do not use /tmp! It will be excluded on backups!
MNTPNT=$(mktemp -d -p /mnt) || exit_ 1 "Could not set temporary mountpoint."

message -i -t "Temporarily disabling power management settings."
systemctl --runtime mask sleep.target hibernate.target suspend.target hybrid-sleep.target &>/dev/null && SYS_CHANGED=true

grep -q 'LVM2_member' < <([[ -d $SRC ]] && cat "$SRC/$F_PART_LIST" || lsblk -o FSTYPE "$SRC") && PKGS+=(lvm)
Expand Down

0 comments on commit 0a6f2ad

Please sign in to comment.