清理与ntpd和ntpdate相关的问题
删除ntpd_cron_patch.sh脚本,修改update_time.sh 做为它的替代品。在setup.sh中不再调用ntpd_cron_patch.sh 而改为调用update_time.sh。
This commit is contained in:
@@ -1,2 +1,19 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
#ntp client
|
||||
if [ -f /usr/sbin/update_time.sh ];then
|
||||
rm /usr/sbin/update_time.sh
|
||||
fi
|
||||
|
||||
cat > /usr/sbin/update_time.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
hwclock -w
|
||||
EOF
|
||||
|
||||
chmod +x /usr/sbin/update_time.sh
|
||||
chown sysadmin:sysadmin /usr/sbin/update_time.sh
|
||||
|
||||
#ntp server
|
||||
sed -i '/ntps1*/d' /etc/ntp/ntp.conf
|
||||
sed -i '/ntp1*/d' /etc/ntp/ntp.conf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user