From 87e293535afc2507a9022c6ed9ed1d5b5f6bd8ef Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 8 Sep 2019 23:53:08 +0200 Subject: [PATCH 1/3] systemd: drop patch that causes filesystem corruption on reboot/shutdown Signed-off-by: Matthias Reichl --- ...d-0005-ignore-storage-flash-mount-points.patch | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 packages/sysutils/systemd/patches/systemd-0005-ignore-storage-flash-mount-points.patch diff --git a/packages/sysutils/systemd/patches/systemd-0005-ignore-storage-flash-mount-points.patch b/packages/sysutils/systemd/patches/systemd-0005-ignore-storage-flash-mount-points.patch deleted file mode 100644 index dd50609f12..0000000000 --- a/packages/sysutils/systemd/patches/systemd-0005-ignore-storage-flash-mount-points.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur a/src/core/mount-setup.c b/src/core/mount-setup.c ---- a/src/core/mount-setup.c 2016-07-17 21:54:48.947510924 +0100 -+++ b/src/core/mount-setup.c 2016-07-17 21:56:02.708552744 +0100 -@@ -121,7 +121,10 @@ - /* Container bind mounts */ - "/proc/sys\0" - "/dev/console\0" -- "/proc/kmsg\0"; -+ "/proc/kmsg\0" -+ /* LibreELEC: always busy */ -+ "/flash\0" -+ "/storage\0"; - - bool mount_point_is_api(const char *path) { - unsigned i; From ec342bdd9bbc0d23ed24d8b606b754840943b07f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Fri, 13 Sep 2019 23:42:16 +0200 Subject: [PATCH 2/3] scripts/install: copy system.d files recursively This allows installing drop-ins. Signed-off-by: Matthias Reichl --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 8323fc84ec..ed2256c3dc 100755 --- a/scripts/install +++ b/scripts/install @@ -82,7 +82,7 @@ if [ "${TARGET}" = "target" ] ; then if [ -d ${PKG_TMP_DIR}/system.d ]; then mkdir -p ${INSTALL}/usr/lib/systemd/system - cp ${PKG_TMP_DIR}/system.d/*.* ${INSTALL}/usr/lib/systemd/system + cp -Pr ${PKG_TMP_DIR}/system.d/*.* ${INSTALL}/usr/lib/systemd/system fi if [ -d ${PKG_TMP_DIR}/udev.d ]; then From dd198bf0b47b5e93e1de57399ce3a4fc021d6601 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Fri, 13 Sep 2019 23:44:19 +0200 Subject: [PATCH 3/3] systemd: prevent unmounting flash via umount.target add drop-in to set DefaultDependencies=no on /flash mount. This removes the Conflicts=umount.target and /flash won't be unmounted by systemd. systemd-shutdown will then later remount it ro and try to unmount it. Signed-off-by: Matthias Reichl --- .../sysutils/systemd/system.d/flash.mount.d/dependencies.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 packages/sysutils/systemd/system.d/flash.mount.d/dependencies.conf diff --git a/packages/sysutils/systemd/system.d/flash.mount.d/dependencies.conf b/packages/sysutils/systemd/system.d/flash.mount.d/dependencies.conf new file mode 100644 index 0000000000..911bbfa0ce --- /dev/null +++ b/packages/sysutils/systemd/system.d/flash.mount.d/dependencies.conf @@ -0,0 +1,2 @@ +[Unit] +DefaultDependencies=no