Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #57617
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.kernel |
| Subject | [PATCH initramfs-tools 3/9] Support setting of RESUME in initramfs.conf or anywhere in conf.d/ |
| Date | 2017-04-21 05:40 +0200 |
| Message-ID | <tyxAm-Ku-11@gated-at.bofh.it> (permalink) |
| References | <tyxAm-Ku-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Currently hooks/resume only reads /etc/initramfs-tools/conf.d/resume,
whereas at boot time it can be set by any configuration file.
Instead, export RESUME from mkinitramfs, which reads all the
configuration files.
When writing an auto-selected resume device, use a filename that
should sort later than user configuration files (zz-resume-auto).
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
hooks/resume | 6 ++----
mkinitramfs | 1 +
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hooks/resume b/hooks/resume
index c43badd03f71..d5a987602787 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,8 +16,6 @@ prereqs)
esac
# First check if a location is set and is a valid swap partition
-test -r /etc/initramfs-tools/conf.d/resume \
- && . /etc/initramfs-tools/conf.d/resume
if [ -n "$RESUME" ] && blkid -p -n swap $RESUME >/dev/null 2>&1; then
# As mkinitramfs copies the config file nothing to do.
exit 0
@@ -37,7 +35,7 @@ if [ -n "$RESUME" ]; then
fi
fi
-# Write detected resume to intramfs conf.d/resume if not in a chroot
+# Write detected resume to intramfs conf.d if not in a chroot
if [ -n "${RESUME}" ] && ! ischroot; then
- echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/resume
+ echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
fi
diff --git a/mkinitramfs b/mkinitramfs
index 9f207a0a00df..24715d5e5287 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -205,6 +205,7 @@ export verbose
export KEYMAP
export MODULES
export BUSYBOX
+export RESUME
# Private, used by 'catenate_cpiogz'.
export __TMPCPIOGZ
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH initramfs-tools 0/9] Fix resume device configuration Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 1/9] hooks/resume: Use correct sort options to select the biggest swap partition Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 3/9] Support setting of RESUME in initramfs.conf or anywhere in conf.d/ Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 6/9] Allow disabling resume from disk at build time by setting RESUME=none Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 5/9] hooks/resume: Check for chroot earlier Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 9/9] NEWS: Add entry explaining the need for RESUME=none on some systems Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 2/9] initramfs.conf(5): Clean up split between general and NFS variables Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 7/9] Support requesting automatic selection of resume device with RESUME=auto Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
[PATCH initramfs-tools 8/9] hooks/resume: Report when we might be doing something surprising Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 05:40 +0200
Re: [PATCH initramfs-tools 0/9] Fix resume device configuration Martin Steigerwald <martin@lichtvoll.de> - 2017-04-21 11:10 +0200
Re: [PATCH initramfs-tools 0/9] Fix resume device configuration Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 17:20 +0200
Re: [PATCH initramfs-tools 0/9] Fix resume device configuration Michael Prokop <mika@debian.org> - 2017-04-21 14:30 +0200
Re: [PATCH initramfs-tools 0/9] Fix resume device configuration Bjørn Mork <bjorn@mork.no> - 2017-04-24 09:50 +0200
Re: [PATCH initramfs-tools 0/9] Fix resume device configuration Ben Hutchings <ben@decadent.org.uk> - 2017-04-26 05:40 +0200
csiph-web