Skip to content

Commit af18eac

Browse files
committed
improve posix compatibility
Signed-off-by: Zen <[email protected]>
1 parent f25fd99 commit af18eac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ugrd/fs/resume.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.4.3"
1+
__version__ = "0.4.4"
22

33
from zenlib.util import contains
44

@@ -21,8 +21,7 @@ def resume(self) -> str:
2121
# Check resume support
2222
[ -n "$1" ] || (ewarn "A resume device must be specified." ; return 1)
2323
[ -w /sys/power/resume ] || (eerror "Kernel does not support resume!" ; return 1)
24-
# TODO: Make POSIX compliant
25-
[[ ! "$(cat /sys/power/resume)" == "0:0" ]] || ewarn "/sys/power/resume not empty, resume has already been attempted!"
24+
[ "$(cat /sys/power/resume)" != "0:0" ] || ewarn "/sys/power/resume not empty, resume has already been attempted!"
2625
# Safety checks
2726
if ! [ -z $(lsblk -Q MOUNTPOINT)] ; then
2827
eerror "Cannot safely resume with mounted block devices:\n$(lsblk -Q MOUNTPOINT -no PATH)"

0 commit comments

Comments
 (0)