summaryrefslogtreecommitdiff
blob: 98cec8213fd149408ce1e4750ae088d799eca4da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 65b2ccac24e056075bf4712f3d1e3ef92b067b46 Mon Sep 17 00:00:00 2001
From: Ultrabug <ultrabug@gentoo.org>
Date: Wed, 3 May 2017 17:22:34 +0200
Subject: [PATCH 06/13] ntp setup: add support for gentoo linux

---
 dist/common/scripts/scylla_ntp_setup | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dist/common/scripts/scylla_ntp_setup b/dist/common/scripts/scylla_ntp_setup
index 75598229..1587e195 100755
--- a/dist/common/scripts/scylla_ntp_setup
+++ b/dist/common/scripts/scylla_ntp_setup
@@ -35,6 +35,16 @@ if is_debian_variant; then
     fi
     ntpdate `cat /etc/ntp.conf |egrep "^server"|head -n1|awk '{print $2}'`
     service ntp start
+elif is_gentoo_variant; then
+    emerge -uq net-misc/ntp
+    pidof ntpd &>/dev/null || ntpdate `cat /etc/ntp.conf |grep "^server"|head -n1|awk '{print $2}'`
+    if is_systemd; then
+        systemctl enable sntpd.service
+        systemctl start sntpd.service
+    else
+        rc-update add ntpd default
+        service ntpd start
+    fi
 else
     yum install -y ntp ntpdate || true
     if [ "$DOMAIN" != "" ]; then
-- 
2.12.2