mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
Merge pull request #1350 from bybai/setupntp
fix 1342 setupntp need enhance to support sles12
This commit is contained in:
commit
0e44282fd5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user