This may be needed to avoid a long wait during boot (see #860403). --- This shouldn't be applied or merged yet because: - I haven't tested it - It depends on a change to initramfs-tools
But it will probably be needed before release.
Ben.
library.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/library.sh b/library.sh
index d73d8809094e..23fa2320ef9d 100644
--- a/library.sh
+++ b/library.sh
@@ -622,18 +622,18 @@ EOF
;;
esac
resume_devfs="$(get_resume_partition)" || resume_devfs=
- if [ "$resume_devfs" ] && [ -e "$resume_devfs" ]; then
- resume="$(mapdevfs "$resume_devfs")" || resume=
- else
- resume=
- fi
- if [ "$resume" ] && ! echo "$resume" | grep -q "^/dev/mapper/";
then
- resume_uuid="$(block-attr --uuid "$resume" || true)"
- if [ "$resume_uuid" ]; then
- resume="UUID=$resume_uuid"
+ if [ "$resume_devfs" ] && [ -e "$resume_devfs" ] && \
+ resume="$(mapdevfs "$resume_devfs")"; then
+ if ! echo "$resume" | grep -q "^/dev/mapper/"; then
+ resume_uuid="$(block-attr --uuid "$resume" ||
true)"
+ if [ "$resume_uuid" ]; then
+ resume="UUID=$resume_uuid"
+ fi
fi
+ else
+ resume=none
fi
- if [ -n "$resumeconf" ] && [ "$resume" ]; then
+ if [ -n "$resumeconf" ]; then
if [ -f $resumeconf ] ; then
sed -e "s@^#* *RESUME=.*@RESUME=$resume@" <
$resumeconf > $resumeconf.new &&
mv $resumeconf.new $resumeconf
signature.asc
Description: Digital signature

