[isar-cip-core][PATCH 01/12] initramfs-etc-overlay-hook: Improve error reporting of script


Jan Kiszka
 

From: Jan Kiszka <jan.kiszka@...>

Fail loudly in case the overlay cannot be mounted.

Signed-off-by: Jan Kiszka <jan.kiszka@...>
---
.../initramfs-etc-overlay-hook/files/etc-overlay.script | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.script b/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.script
index a9a3663..6e5aacd 100644
--- a/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.script
+++ b/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.script
@@ -31,4 +31,6 @@ fi

mkdir -p ${rootmnt}/var/local/etc
mkdir -p ${rootmnt}/var/local/.atomic
-mount -t overlay -o lowerdir=${rootmnt}/etc,upperdir=${rootmnt}/var/local/etc,workdir=${rootmnt}/var/local/.atomic overlay ${rootmnt}/etc
+if ! mount -t overlay -o lowerdir=${rootmnt}/etc,upperdir=${rootmnt}/var/local/etc,workdir=${rootmnt}/var/local/.atomic overlay ${rootmnt}/etc; then
+ panic "Can't mount overlay!"
+fi
--
2.34.1

Join cip-dev@lists.cip-project.org to automatically receive all group messages.