[Fedora-spins] [spin-kickstarts] Prevent reseting the clock when shutting down.

Bruno Wolff III bruno at fedoraproject.org
Thu Mar 31 14:01:41 UTC 2011


commit d935d49b26109e2ba70b797de5407758224aa646
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Wed Mar 30 23:00:32 2011 -0500

    Prevent reseting the clock when shutting down.
    
    With systemd the old method of preventing the hardware clock from
    getting reset no longer works and we need to do it a bit differently.

 fedora-live-base.ks |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/fedora-live-base.ks b/fedora-live-base.ks
index f2d7766..a88834c 100644
--- a/fedora-live-base.ks
+++ b/fedora-live-base.ks
@@ -81,6 +81,9 @@ exists() {
 
 touch /.liveimg-configured
 
+# Make sure we don't mangle the hardware clock on shutdown
+ln -sf /dev/null /etc/systemd/system/hwclock-save.service
+
 # mount live image
 if [ -b \`readlink -f /dev/live\` ]; then
    mkdir -p /mnt/live
@@ -207,9 +210,6 @@ chkconfig --level 345 atd off 2>/dev/null || :
 # Stopgap fix for RH #217966; should be fixed in HAL instead
 touch /media/.hal-mtab
 
-# workaround clock syncing on shutdown that we don't want (#297421)
-sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
-
 # and hack so that we eject the cd on shutdown if we're using a CD...
 if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
   cat >> /sbin/halt.local << FOE


More information about the spins mailing list