summaryrefslogtreecommitdiff
blob: b1e8880985c2f488a6bddf63fd215cb5a4909061 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From fa0944ac193b053585a553c8680faf24d57affc2 Mon Sep 17 00:00:00 2001
From: Alexys Jacob <ultrabug@gentoo.org>
Date: Wed, 17 May 2017 18:06:54 +0200
Subject: [PATCH 9/9] scylla_setup: add gentoo linux installation detection

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
---
 dist/common/scripts/scylla_setup | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dist/common/scripts/scylla_setup b/dist/common/scripts/scylla_setup
index 7d1de81e..1f86dce3 100755
--- a/dist/common/scripts/scylla_setup
+++ b/dist/common/scripts/scylla_setup
@@ -74,6 +74,8 @@ interactive_ask_service() {
 verify_package() {
     if is_debian_variant; then
         dpkg -s $1 > /dev/null 2>&1 &&:
+    elif is_gentoo_variant; then
+        find /var/db/pkg/dev-db -type d -name "${1}-*" | egrep -q ".*"
     else
         rpm -q $1 > /dev/null 2>&1 &&:
     fi
@@ -269,6 +271,9 @@ if [ $ENABLE_SERVICE -eq 1 ]; then
     if is_systemd; then
         systemctl enable scylla-server.service
         systemctl enable collectd.service
+    elif is_gentoo_variant; then
+        rc-update add scylla-server default
+        rc-update add collectd default
     fi
     if [ $INTERACTIVE -eq 1 ] && [ ! -f /etc/scylla.d/housekeeping.cfg ]; then
         interactive_ask_service "Do you want to enable ScyllaDB version check?" "Answer yes to automatically start Scylla-housekeeping service that checks for a newer version periodically; answer no to skip this step." "yes" &&:
@@ -304,7 +309,9 @@ if [ "$CUR_VERSION" != "" ]; then
 fi
 
 # scylla_selinux_setup only supports Red Hat variants
-if ! is_debian_variant; then
+if is_debian_variant || is_gentoo_variant; then
+    echo "scylla_selinux_setup only supports Red Hat variants"
+else
     if [ $INTERACTIVE -eq 1 ]; then
         interactive_ask_service "Do you want to disable SELinux?" "Answer yes to disable SELinux and improve performance; answer no to keep it activated." "yes" &&:
         SELINUX_SETUP=$?
-- 
2.12.2