This used to cause some echo write/invalid argument errors. Simplest fix is to use readlink with -f for absolute path and -n to remove trailing newline.
See previous discussion here:
https://github.com/void-linux/void-packages/issues/13024
esac
[ -x "$(command -v resume)" ] && command resume $a_splash "$resume"
- # parsing the output of ls is Bad, but until there is a better way...
- ls -lH "$resume" | (
- read x x x x maj min x;
- echo "${maj%,}:$min"> /sys/power/resume)
- >/.resume
+ (readlink -fn $resume > /sys/power/resume)>/.resume
}