Commit 433e1ca0 authored by Ben Hutchings's avatar Ben Hutchings

Allow disabling resume from disk at build time by setting RESUME=none

Signed-off-by: 's avatarBen Hutchings <ben@decadent.org.uk>
parent 7106c3e0
...@@ -16,7 +16,8 @@ prereqs) ...@@ -16,7 +16,8 @@ prereqs)
esac esac
# First check if a location is set and is a valid swap partition # 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. # As mkinitramfs copies the config file nothing to do.
exit 0 exit 0
fi fi
......
...@@ -189,8 +189,8 @@ if [ -z "${BOOT}" ]; then ...@@ -189,8 +189,8 @@ if [ -z "${BOOT}" ]; then
BOOT=local BOOT=local
fi fi
if [ -n "${noresume}" ]; then if [ -n "${noresume}" ] || [ "$RESUME" = none ]; then
export noresume export noresume=y
unset resume unset resume
else else
resume=${RESUME:-} resume=${RESUME:-}
......
...@@ -81,6 +81,7 @@ Specifies the device used for suspend-to-disk (hibernation), which the ...@@ -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, initramfs code should attempt to resume from. If this is not defined,
.B mkinitramfs .B mkinitramfs
will automatically select the largest available swap partition. will automatically select the largest available swap partition.
Set it to \fInone\fP to disable resume from disk.
.SH VARIABLES FOR NFS BOOT .SH VARIABLES FOR NFS BOOT
.TP .TP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment