summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-02-29 11:39:11 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-04 10:51:02 -0600
commitee91f8da7d23486148f6abff3b7cf95a053acf94 (patch)
treea5b88fc99243dc6131375f422ead88ce3fcd8c28
parent517f9d7f4e245769fcdaac995168daee8f0b3cd6 (diff)
downloadtalos-openbmc-ee91f8da7d23486148f6abff3b7cf95a053acf94.tar.gz
talos-openbmc-ee91f8da7d23486148f6abff3b7cf95a053acf94.zip
update: Read whitelist from the /run/initramfs directory
Find the whitelist under /run/initramfs directory instead of looking in root directory. This results in the whitelist always existing and being the same instance (copy) in all environments. Currently the update script is invoked from two places: from shutdown, where systemd bind-mounted the initramfs directory on itself and made it root (with its parent /run mounted underneath it in a twist), and from the initramfs init script where it copied the files from its root directory into the /run/initramfs directory for use at shutdown time when the original rootfs is no longer reachable. By looking under /run/initramfs we will always look at one copy of the whitelist. This will also allow future modes where the update script can be invoked while running from a copies of the file systems located in RAM. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index f40a54692..efdd91301 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -63,6 +63,9 @@ doclean=
dosave=y
dorestore=y
+whitelist=/run/initramfs/whitelist
+image=/run/initramfs/image-
+
while test "$1" != "${1#-}"
do
case "$1" in
@@ -104,12 +107,11 @@ then
d="$save/$f"
mkdir -p "${d%/*}"
cp -rp $upper/$f "${d%/*}/"
- done < whitelist
+ done < $whitelist
umount $rwdir
fi
-image=/run/initramfs/image-
for f in $image*
do
m=$(findmtd ${f#$image})
OpenPOWER on IntegriCloud