initrd.scripts: make resume_init use find_real_device

master
Fabio Erculiani 12 years ago
parent addfa95e96
commit 755eb93994

@ -1431,33 +1431,14 @@ resume_init() {
return 0 return 0
fi fi
case "${REAL_RESUME}" in local resume_dev=$(find_real_device "${REAL_RESUME}")
LABEL=*|UUID=*) if [ -n "${resume_dev}" ]; then
REAL_RESUME="${resume_dev}"
RESUME_DEV="" good_msg "Detected real_resume=${resume_dev}"
retval=1 else
bad_msg "Cannot resolve real_resume=${REAL_RESUME}"
if [ ${retval} -ne 0 ]; then bad_msg "Something bad may happen, crossing fingers"
RESUME_DEV=$(findfs "${REAL_RESUME}" 2>/dev/null) fi
retval=$?
fi
if [ ${retval} -ne 0 ]; then
RESUME_DEV=$(busybox findfs "${REAL_RESUME}" 2>/dev/null)
retval=$?
fi
if [ ${retval} -ne 0 ]; then
RESUME_DEV=$(blkid -o device -l -t "${REAL_RESUME}")
retval=$?
fi
if [ ${retval} -eq 0 ] && [ -n "${RESUME_DEV}" ]; then
good_msg "Detected real_resume=${RESUME_DEV}"
REAL_RESUME="${RESUME_DEV}"
fi
;;
esac
do_resume do_resume
} }

Loading…
Cancel
Save