summaryrefslogtreecommitdiff
path: root/ntpd.configure
diff options
context:
space:
mode:
authorJavier Jardon <jjardon@gnome.org>2015-04-17 15:49:26 +0100
committerBaserock Gerrit <gerrit@baserock.org>2015-04-22 10:12:56 +0000
commit30f14e212cb62026b17b43cdda24587c570aff72 (patch)
treef8fa224cf318e9e4abbc631bb35eebd8ca6996a1 /ntpd.configure
parent70cf0464cf7ff98b7f6c843ffd076e21b5be75f9 (diff)
downloaddefinitions-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 'ntpd.configure')
-rw-r--r--ntpd.configure54
1 files changed, 0 insertions, 54 deletions
diff --git a/ntpd.configure b/ntpd.configure
deleted file mode 100644
index fd39d9e9..00000000
--- a/ntpd.configure
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-#
-# Copyright © 2015 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-set -e
-
-ROOT="$1"
-
-# NTP conflicts with systemd-timesyncd,
-# so if we want to use NTP then we need to disable systemd-timesyncd
-rm "$ROOT/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service"
-
-# On at least x86 64 the default rlimit
-# ntp sets (32kB) isn't enough, so increase it
-cat >> "$ROOT/etc/ntp.conf" << EOF
-
-# The default rlimit isn't enough in some cases
-# so we set a higher limit here
-rlimit memlock 256
-EOF
-
-NTPD_PIDFILE=/run/ntpd.pid
-cat > "$ROOT/usr/lib/systemd/system/ntpd.service" << EOF
-[Unit]
-Description=Network Time Service
-After=network.target nss-lookup.target
-Conflicts=systemd-timesyncd.service
-
-[Service]
-Type=forking
-PIDFile=$NTPD_PIDFILE
-ExecStart=/usr/bin/ntpd -u ntp:ntp -p $NTPD_PIDFILE
-PrivateTmp=True
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-ln -s "/usr/lib/systemd/system/ntpd.service" \
- "$ROOT/usr/lib/systemd/system/multi-user.target.wants/ntpd.service"