packages: ntp/ntp-client.init, ntp/ntp.spec rel 2; when syncing hardware cl...

arekm arekm at pld-linux.org
Thu Jan 27 06:54:29 CET 2011


Author: arekm                        Date: Thu Jan 27 05:54:29 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
rel 2; when syncing hardware clock obey sysconfig/clock settings

---- Files affected:
packages/ntp:
   ntp-client.init (1.11 -> 1.12) , ntp.spec (1.142 -> 1.143) 

---- Diffs:

================================================================
Index: packages/ntp/ntp-client.init
diff -u packages/ntp/ntp-client.init:1.11 packages/ntp/ntp-client.init:1.12
--- packages/ntp/ntp-client.init:1.11	Sun Dec 12 17:23:49 2010
+++ packages/ntp/ntp-client.init	Thu Jan 27 06:54:23 2011
@@ -14,6 +14,9 @@
 # if not specified in config
 NTPDATE_USER="ntp"
 
+# Source clock configuration
+[ -r /etc/sysconfig/clock ] &&  . /etc/sysconfig/clock
+
 # Source ntp configuration
 . /etc/sysconfig/ntpdate
 
@@ -31,7 +34,22 @@
 	/usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS || return $?
 
 	if is_yes "$SYNC_HWCLOCK"; then
-		/sbin/hwclock --systohc
+		CLOCKFLAGS="--systohc"
+		if is_yes "$UTC" ; then
+			CLOCKFLAGS="$CLOCKFLAGS --utc"
+		else
+			CLOCKFLAGS="$CLOCKFLAGS --localtime"
+		fi
+
+		if is_yes "$ARC" ; then
+			CLOCKFLAGS="$CLOCKFLAGS -A"
+		fi
+
+		if is_yes "$SRM" ; then
+			CLOCKFLAGS="$CLOCKFLAGS -S"
+		fi
+
+		/sbin/hwclock $CLOCKFLAGS
 	fi
 }
 

================================================================
Index: packages/ntp/ntp.spec
diff -u packages/ntp/ntp.spec:1.142 packages/ntp/ntp.spec:1.143
--- packages/ntp/ntp.spec:1.142	Sun Dec 12 20:43:40 2010
+++ packages/ntp/ntp.spec	Thu Jan 27 06:54:23 2011
@@ -12,7 +12,7 @@
 Summary(pt_BR.UTF-8):	Network Time Protocol versão 4
 Name:		ntp
 Version:	4.2.6p1
-Release:	1
+Release:	2
 License:	distributable
 Group:		Networking/Daemons
 Source0:	http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
@@ -429,6 +429,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.143  2011/01/27 05:54:23  arekm
+rel 2; when syncing hardware clock obey sysconfig/clock settings
+
 Revision 1.142  2010/12/12 19:43:40  glen
 - release 1
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ntp/ntp-client.init?r1=1.11&r2=1.12&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ntp/ntp.spec?r1=1.142&r2=1.143&f=u



More information about the pld-cvs-commit mailing list