2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

fix 1342 setupntp need enhance to support sles12

This commit is contained in:
bybai 2016-06-21 04:29:57 -04:00
parent 6612ffca3e
commit 99e4522fde

View File

@ -164,6 +164,15 @@ restrict 127.0.0.1" >>$conf_file
else
echo "SYNC_HWCLOCK=yes" >> /etc/sysconfig/ntpd
fi
elif [ -f /etc/sysconfig/ntp ];then
grep -i "NTPD_FORCE_SYNC_ON_STARTUP" /etc/sysconfig/ntp
if [ $? -eq 0 ];then
sed -i 's/NTPD_FORCE_SYNC_ON_STARTUP="no"/NTPD_FORCE_SYNC_ON_STARTUP="yes"/' /etc/sysconfig/ntp
fi
grep -i "NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP" /etc/sysconfig/ntp
if [ $? -eq 0 ];then
sed -i 's/NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP="no"/NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP="yes"/' /etc/sysconfig/ntp
fi
else
cron_file="/etc/cron.daily/xcatsethwclock"
if [ ! -f "$cron_file" ];then