diff options
author | Javier Jardon <jjardon@gnome.org> | 2015-04-17 15:49:26 +0100 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2015-04-22 10:12:56 +0000 |
commit | 30f14e212cb62026b17b43cdda24587c570aff72 (patch) | |
tree | f8fa224cf318e9e4abbc631bb35eebd8ca6996a1 /strata/ntpd | |
parent | 70cf0464cf7ff98b7f6c843ffd076e21b5be75f9 (diff) | |
download | definitions-30f14e212cb62026b17b43cdda24587c570aff72.tar.gz |
ntpd: Set default .service and conf file in the morphology file
So we can avoid an specific extension to introduce it in the system
Change-Id: I57f446977e3e5fba5fe98be6fdd6a3f150623f14
Diffstat (limited to 'strata/ntpd')
-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 fd561de1..49316c14 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: |