commit | b94ddcc7896fe00cb79e33b39698d23713eba75b | [log] [tgz] |
---|---|---|
author | Edward A. James <eajames@us.ibm.com> | Thu Oct 05 17:17:45 2017 -0500 |
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | Tue Oct 24 13:34:27 2017 +0000 |
tree | a8b0041d049afe74552b4969c55132e752d0be93 | |
parent | cd88ae0f6f6c2e570d927f49c2c9aa988c03113d [diff] |
Prepare-overlay service: check for mountpoint before removing workdir The service was getting called twice, resulting in a removal of the overlayfs workdir while the overlay was mounted. Solve this by checking if the /etc overlay is mounted yet before removing the workdir. Need to add mountpoint to busybox for this. Resolves openbmc/openbmc#2429 Change-Id: I407a07dcc3f3856af12a7f3a52966fe7c3d756c3 Signed-off-by: Edward A. James <eajames@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-core/busybox/busybox/mountpoint.cfg b/meta-phosphor/common/recipes-core/busybox/busybox/mountpoint.cfg new file mode 100644 index 0000000..8b00951 --- /dev/null +++ b/meta-phosphor/common/recipes-core/busybox/busybox/mountpoint.cfg
@@ -0,0 +1 @@ +CONFIG_MOUNTPOINT=y
diff --git a/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend b/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend index 39a6033..e6678fc 100644 --- a/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend +++ b/meta-phosphor/common/recipes-core/busybox/busybox_%.bbappend
@@ -1,4 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://busybox.cfg" SRC_URI += "file://flash.cfg" +SRC_URI += "file://mountpoint.cfg" SRC_URI += "file://0001-Stop-watchdog-first-on-startup.patch"
diff --git a/meta-phosphor/common/recipes-phosphor/mount-overlay-help/mount-overlay-help/prepare-overlay.service b/meta-phosphor/common/recipes-phosphor/mount-overlay-help/mount-overlay-help/prepare-overlay.service index ae5f461..66843b3 100644 --- a/meta-phosphor/common/recipes-phosphor/mount-overlay-help/mount-overlay-help/prepare-overlay.service +++ b/meta-phosphor/common/recipes-phosphor/mount-overlay-help/mount-overlay-help/prepare-overlay.service
@@ -4,6 +4,6 @@ DefaultDependencies=false [Service] -ExecStart=/bin/sh -c "rm -rf /var/persist/etc-work && mkdir -p /var/persist/etc /var/persist/etc-work /var/persist/home/root" +ExecStart=/bin/sh -c "if ! mountpoint /etc; then rm -rf /var/persist/etc-work && mkdir -p /var/persist/etc-work; fi; mkdir -p /var/persist/etc /var/persist/home/root" Type=oneshot RemainAfterExit=no