summaryrefslogtreecommitdiff
path: root/meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch
diff options
context:
space:
mode:
authorjmbills <jason.m.bills@intel.com>2021-08-03 01:45:08 +0300
committerGitHub <noreply@github.com>2021-08-03 01:45:08 +0300
commit10ad77d5bc86709d8ff7f95e7040e39f1c153903 (patch)
tree307cedb87f4c0a329740c55ac364ed489d1d8fc2 /meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch
parentc6b1c6ba7a01b7987d65d61c262c44c320193108 (diff)
parent67327ddc580cb9a85219a534844832a1682780d4 (diff)
downloadopenbmc-10ad77d5bc86709d8ff7f95e7040e39f1c153903.tar.xz
Merge pull request #69 from Intel-BMC/update2021-0.631-0.63
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.patch29
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
+