On rhels7 env,there's error message when call setupntp script.
Tue Aug 12 02:04:24 EDT 2014 Running postscript: setupntp
Running in chroot, ignoring request.
12 Aug 02:04:39 ntpdate[32398]: adjust time server 20.10.10.100 offset -0.000012 sec
grep: /etc/sysconfig/clock: No such file or directory
Running in chroot, ignoring request.
ln -s '/usr/lib/systemd/system/ntpd.service' '/etc/systemd/system/multi-user.target.wants/ntpd.service'
fixed in 2.8.5:
commit c86b4bda9658eb74be5f4bf9932fd17571792fbb
Author: immarvin yangsbj@cn.ibm.com
Date: Tue Aug 12 08:36:44 2014 -0700
diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp
index ec2149b..87313cd 100755
--- a/xCAT/postscripts/setupntp
+++ b/xCAT/postscripts/setupntp
@@ -166,11 +166,15 @@ restrict 127.0.0.1" >>$conf_file
elif [ -f "/etc/debian_version" ];then
sed -i 's/.UTC./UTC=yes/' /etc/default/rcS
else
- grep -i "utc" /etc/sysconfig/clock
- if [ $? -eq 0 ];then
- sed -i 's/.UTC./UTC=yes/' /etc/sysconfig/clock
- else
- echo "UTC=yes" >> /etc/sysconfig/clock
+ if [ -f "/etc/sysconfig/clock" ];then
+ grep -i "utc" /etc/sysconfig/clock
+ if [ $? -eq 0 ];then
+ sed -i 's/.UTC./UTC=yes/' /etc/sysconfig/clock
+ else
+ echo "UTC=yes" >> /etc/sysconfig/clock
+ fi
+ elif type -P timedatectl >/dev/null 2>&1 ;then
+ timedatectl set-local-rtc 0
fi
fi
fixed in 2.9:
commit 81e86de979077114542ff7d24e02d983c72512b1
Author: immarvin yangsbj@cn.ibm.com
Date: Tue Aug 12 08:36:44 2014 -0700