diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-28 13:10:58 +0000 |
---|---|---|
committer | Morph (on behalf of Adam Coldrick) <adam.coldrick@codethink.co.uk> | 2015-04-28 13:10:58 +0000 |
commit | f398e6501b400f6c32fb4d1ba920ac41d09a9795 (patch) | |
tree | 88183ce9240a52d78ce7784e18ca4d5a001c31a5 /strata/ntpd/ntpd.morph | |
parent | 888b2af4d841cf09fc8b8565a35f3484369f8aaa (diff) | |
download | definitions-baserock/6453f312359f4317803ef7f14b58d21f/aff0f41a103e4d3cb83aaf9ed88359b2.tar.gz |
Morph build deffc157ea9749848e5770b25da08214baserock/6453f312359f4317803ef7f14b58d21f/aff0f41a103e4d3cb83aaf9ed88359b2
System branch: master
Diffstat (limited to 'strata/ntpd/ntpd.morph')
-rw-r--r-- | strata/ntpd/ntpd.morph | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/strata/ntpd/ntpd.morph b/strata/ntpd/ntpd.morph index fe875b35..e4e710cb 100644 --- a/strata/ntpd/ntpd.morph +++ b/strata/ntpd/ntpd.morph @@ -3,6 +3,47 @@ kind: chunk build-system: autotools configure-commands: - ./configure --prefix="$PREFIX" --enable-linuxcaps +post-install-commands: +- | + cat > ntpd.service << EOF + [Unit] + Description=Network Time Service + After=network.target nss-lookup.target + Conflicts=systemd-timesyncd.service + + [Service] + Type=forking + ExecStart=/usr/bin/ntpd -u ntp:ntp + PrivateTmp=True + Restart=on-failure + + [Install] + WantedBy=multi-user.target + EOF +- install -D -m 644 ntpd.service "$DESTDIR"/lib/systemd/system/ntpd.service +- mkdir -p "$DESTDIR"/lib/systemd/system/multi-user.target.wants +- ln -s /lib/systemd/system/ntpd.service "$DESTDIR"/lib/systemd/system/multi-user.target.wants/ntpd.service +- | + cat > ntp.conf << EOF + # We use iburst here to reduce the potential initial delay to set the clock + server 0.pool.ntp.org iburst + server 1.pool.ntp.org iburst + server 2.pool.ntp.org iburst + server 3.pool.ntp.org iburst + + # kod - notify client when packets are denied service, + # rather than just dropping the packets + # + # nomodify - deny queries which attempt to modify the state of the server + # + # notrap - decline to provide mode 6 control message trap service to + # matching hosts + # + # see ntp.conf(5) for more details + restrict -4 default kod notrap nomodify + restrict -6 default kod notrap nomodify + EOF +- install -D -m 644 ntp.conf "$DESTDIR"/etc/ntp.conf system-integration: ntpd-misc: 00-add-ntpd-user: |