diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-07-30 00:16:52 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-07-30 00:16:52 +0300 |
commit | bb6a14e2f317abf60677c6ad8de9c33d5760bf36 (patch) | |
tree | 00457d3677e86437cec25fd7dab6c4513a53b1a4 /meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch | |
parent | defdca82c107f46e980c84bffb1b2c1263522fa0 (diff) | |
parent | cf6fd27dbd8e2d1b507f8c3752b85801b2c6ef57 (diff) | |
download | openbmc-bb6a14e2f317abf60677c6ad8de9c33d5760bf36.tar.xz |
Merge tag '0.63' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch')
-rw-r--r-- | meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch b/meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch new file mode 100644 index 000000000..7631c85ce --- /dev/null +++ b/meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch @@ -0,0 +1,29 @@ +diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh +index 62be89f039..689fbea5bf 100644 +--- a/obmc-init.sh ++++ b/obmc-init.sh +@@ -275,6 +275,14 @@ then + fi + fi + ++# Ensure that we clean our rwfs on version change ++if mount $rwdev $rwdir -t $rwfst -o $rwopts; then ++ if ! cmp "$rwdir"/os-release /etc/os-release 2>/dev/null; then ++ echo "RWFS from older BMC version, cleaning" ++ touch $trigger ++ fi ++ umount "$rwdir" ++fi + if grep -w clean-rwfs-filesystem $optfile + then + echo "Cleaning of read-write overlay filesystem requested." +@@ -399,6 +407,9 @@ HERE + debug_takeover "$msg" + fi + ++# Keep track of the last version to use this rwfs ++cp /etc/os-release "$rwdir"/os-release ++ + rm -rf $work + mkdir -p $upper $work + |