mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix ntpd config on clients.
https://fedorahosted.org/freeipa/ticket/4094
This commit is contained in:
committed by
Martin Kosek
parent
2bb2aa8c48
commit
923e9d8bed
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user