Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
hooks/resume | 3 ++-
init | 4 ++--
initramfs.conf.5 | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hooks/resume b/hooks/resume
index e8a49124c3f9..3e3f6dbbc3b6 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,7 +16,8 @@ prereqs)
esac
# First check if a location is set and is a valid swap partition
-if [ -n "$RESUME" ] && blkid -p -n swap $RESUME >/dev/null 2>&1; then
+if [ -n "$RESUME" ] && \
+ { [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; }; then
# As mkinitramfs copies the config file nothing to do.
exit 0
fi
diff --git a/init b/init
index 9552e5cab9c0..1334dca6a99d 100755
--- a/init
+++ b/init
@@ -189,8 +189,8 @@ if [ -z "${BOOT}" ]; then
BOOT=local
fi
-if [ -n "${noresume}" ]; then
- export noresume
+if [ -n "${noresume}" ] || [ "$RESUME" = none ]; then
+ export noresume=y
unset resume
else
resume=${RESUME:-}
diff --git a/initramfs.conf.5 b/initramfs.conf.5
index 4d142dd0950a..c0d778ca1928 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -81,6 +81,7 @@ Specifies the device used for suspend-to-disk (hibernation), which the
initramfs code should attempt to resume from. If this is not defined,
.B mkinitramfs
will automatically select the largest available swap partition.
+Set it to \fInone\fP to disable resume from disk.
.SH VARIABLES FOR NFS BOOT
.TP
Attachment:
signature.asc
Description: Digital signature