summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-01 12:15:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-01 12:16:00 +0000
commit50f71e4812f48c1f08239651412900e3d90860b2 (patch)
treee534350296f024308e5c69b6cef3bdd8ff06ae12
parentReleasing progress-linux version 0.129-0dschinn1. (diff)
downloadinitramfs-tools-50f71e4812f48c1f08239651412900e3d90860b2.zip
initramfs-tools-50f71e4812f48c1f08239651412900e3d90860b2.tar.xz
Merging upstream version 0.130.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xhooks/resume12
1 files changed, 9 insertions, 3 deletions
diff --git a/hooks/resume b/hooks/resume
index 06ff62a..1032f7b 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -15,10 +15,16 @@ prereqs)
;;
esac
-# First check if a location is set and is a valid swap partition
+. /usr/share/initramfs-tools/scripts/functions
+
+# First check if a location is set and is a valid swap partition.
+# If so, the config file will be copied in and there is nothing to do.
if [ -n "$RESUME" ] && [ "$RESUME" != auto ]; then
- if [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; then
- # As mkinitramfs copies the config file nothing to do.
+ if [ "$RESUME" = none ]; then
+ exit 0
+ fi
+ if resume_dev_node="$(resolve_device "$RESUME")" && \
+ blkid -p -n swap "$resume_dev_node" >/dev/null 2>&1; then
exit 0
fi