Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-05-03 22:07:39 (GMT)
committer Daniel Drake <dsd@laptop.org>2012-05-03 22:07:39 (GMT)
commit6498241ea2e89041b73de50faa0741ec5a882427 (patch)
tree3672fa8ba8ef0bf0d2c802957de230e8cf39f366
parent661ce44ca406040e23cef1b62c1730a7a9754d5e (diff)
base: remount / read-only during shutdown (#11766)
systemd currently skips our / mount (because it's a bind mount) during shutdown, rather than remounting read-only. This is causing some minor filesystem corruption. Add a workaround until this is solved upstream: https://bugs.freedesktop.org/show_bug.cgi?id=49447
-rw-r--r--modules/base/kspost.10.core.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/base/kspost.10.core.inc b/modules/base/kspost.10.core.inc
index 8a409ee..e17f564 100644
--- a/modules/base/kspost.10.core.inc
+++ b/modules/base/kspost.10.core.inc
@@ -235,3 +235,11 @@ sed -i -e 's,/var/log/messages,:omfile:$messages,' \
sed -i -e 's/EnableWattsUpPro=true/EnableWattsUpPro=false/' \
-e 's/IgnoreLid=false/IgnoreLid=true/' \
/etc/UPower/UPower.conf
+
+# work around systemd bug preventing / being safely handled on shutdown (#11766)
+# https://bugs.freedesktop.org/show_bug.cgi?id=49447
+cat >> /lib/systemd/system-shutdown/olpc_shutdown.sh <<EOF
+#!/bin/sh
+/usr/bin/mount -o remount,ro /
+EOF
+chmod a+x /lib/systemd/system-shutdown/olpc_shutdown.sh