public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] baselayout r3183 - in branches/baselayout-1_12: etc/conf.d init.d
@ 2011-02-06 18:24 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2011-02-06 18:24 UTC (permalink / raw
  To: gentoo-commits

Author: vapier
Date: 2011-02-06 18:24:54 +0000 (Sun, 06 Feb 2011)
New Revision: 3183

Modified:
   branches/baselayout-1_12/etc/conf.d/clock
   branches/baselayout-1_12/init.d/clock
Log:
clock: allow people to just set the timezone #248131 by Dimitris Mandalidis

Modified: branches/baselayout-1_12/etc/conf.d/clock
===================================================================
--- branches/baselayout-1_12/etc/conf.d/clock	2011-02-06 18:21:19 UTC (rev 3182)
+++ branches/baselayout-1_12/etc/conf.d/clock	2011-02-06 18:24:54 UTC (rev 3183)
@@ -20,6 +20,12 @@
 
 CLOCK_OPTS=""
 
+# If you want to set the System Time to the Hardware Clock during bootup.
+# Note that newer kernels will do this for you automatically during boot
+# via the CONFIG_RTC_HCTOSYS kernel config option.
+
+CLOCK_HCTOSYS="yes"
+
 # If you want to set the Hardware Clock to the current System Time (software
 # clock) during shutdown, then say "yes" here.
 

Modified: branches/baselayout-1_12/init.d/clock
===================================================================
--- branches/baselayout-1_12/init.d/clock	2011-02-06 18:21:19 UTC (rev 3182)
+++ branches/baselayout-1_12/init.d/clock	2011-02-06 18:24:54 UTC (rev 3183)
@@ -63,7 +63,7 @@
 }
 
 start() {
-	local myopts=""
+	local myopts="" syscmd=""
 	local myadj=""
 	local TBLURB="" fakeit=0
 	local errstr=""
@@ -82,14 +82,21 @@
 		modprobe rtc &> /dev/null || modprobe genrtc &> /dev/null
 	fi
 
-	ebegin "Setting system clock using the hardware clock [${TBLURB}]"
+	if [[ ${CLOCK_HCTOSYS} == "yes" ]] ; then
+		ebegin "Setting system clock using the hardware clock [${TBLURB}]"
+		syscmd="--hctosys"
+	else
+		ebegin "Setting timezone [${TBLURB}]"
+		syscmd="--systz"
+	fi
+
 	if [[ ${fakeit} -eq 1 ]] ; then
 		ret=0
 
 	elif [[ -x /sbin/hwclock ]] ; then
 		# Since hwclock always exit's with a 0, need to check its output.
 		errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null)
-		errstr="${errstr}$(/sbin/hwclock --hctosys ${myopts} 2>&1 >/dev/null)"
+		errstr="${errstr}$(/sbin/hwclock ${syscmd} ${myopts} 2>&1 >/dev/null)"
 
 		if [[ -n ${errstr} ]] ; then
 			ewarn "${errstr}"




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-06 18:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 18:24 [gentoo-commits] baselayout r3183 - in branches/baselayout-1_12: etc/conf.d init.d Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox