Fix ntpd config on clients.

https://fedorahosted.org/freeipa/ticket/4094
This commit is contained in:
Jan Cholasta authored and Martin Kosek committed 2014-01-24 13:01:32 +01:00
1 parent 2bb2aa8c48
commit 923e9d8bed
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -562,6 +562,16 @@ if [ $1 -gt 1 ] ; then
/sbin/restorecon /etc/krb5.conf
fi
fi
if [ -f '/etc/sysconfig/ntpd' -a $restore -ge 2 ]; then
if grep -E -q 'OPTIONS=.*-u ntp:ntp' /etc/sysconfig/ntpd 2>/dev/null; then
sed -r '/OPTIONS=/ { s/\s+-u ntp:ntp\s+/ /; s/\s*-u ntp:ntp\s*// }' /etc/sysconfig/ntpd >/etc/sysconfig/ntpd.ipanew
mv /etc/sysconfig/ntpd.ipanew /etc/sysconfig/ntpd
/sbin/restorecon /etc/sysconfig/ntpd
/bin/systemctl condrestart ntpd.service 2>&1 || :
fi
fi
fi
%triggerin -n freeipa-client -- openssh-server
+1 -1
View File
@@ -73,7 +73,7 @@ keys /etc/ntp/keys
"""
ntp_sysconfig = """# Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
OPTIONS="-x -p /var/run/ntpd.pid"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=yes