initrd.scripts: text if ${device} is set before messing with /sys/power

master
Fabio Erculiani 12 years ago
parent ba0a7ea078
commit 79de6f5fd6

@ -1272,7 +1272,8 @@ do_resume() {
swsusp_resume() {
# determine swap resume partition
local device=$(ls -lL "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \ -f 5-6 | sed 's/,\ */:/')
[ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume
[ -f /sys/power/resume -a -n "${device}" ] && \
echo "${device}" > /sys/power/resume
}
tuxonice_resume() {

Loading…
Cancel
Save