summaryrefslogtreecommitdiff
blob: eb5a3f4b08a4e20a9fd46ffbb21baa60da26a897 (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
48
49
50
51
52
53
54
55
simple patch to adapt cvmfs scripts for openrc
bicatali@gentoo.org 06/2013

--- cvmfs/cvmfs_config.orig	2013-06-17 15:42:57.011022876 -0700
+++ cvmfs/cvmfs_config	2013-06-17 15:46:22.395157110 -0700
@@ -14,20 +14,23 @@
   Linux )
     if [ -x /sbin/service ]; then
       service="/sbin/service"
-    else
+    elif [ -x /usr/sbin/service ]; then
       # Ubuntu
       service="/usr/sbin/service"
+    elif [ -x /sbin/rc-service ]; then
+      # OpenRC
+      service="/sbin/rc-service"
     fi
     if [ -x /sbin/pidof ]; then
       pidof="/sbin/pidof"
     else
-      # Ubuntu
+      # Ubuntu, Gentoo
       pidof="/bin/pidof"
     fi
     if [ -x /sbin/fuser ]; then
       fuser="/sbin/fuser"  # RHEL
     else
-      fuser="/bin/fuser"  # Ubuntu, SuSE
+      fuser="/bin/fuser"  # Ubuntu, SuSE, Gentoo
     fi
     if [ ! -x /usr/bin/attr ]; then
       # Fedora
--- cvmfs/cvmfs_server.orig	2013-06-17 15:42:51.426992247 -0700
+++ cvmfs/cvmfs_server	2013-06-17 15:44:02.092381590 -0700
@@ -38,7 +38,7 @@
 if which httpd2 >/dev/null 2>&1; then #SLES/OpenSuSE
   APACHE_SERVICE="apache2"
   APACHE_CONF=${APACHE_SERVICE}
-elif which apache2 >/dev/null 2>&1; then # Debian based
+elif which apache2 >/dev/null 2>&1; then # Debian, Gentoo based
   APACHE_SERVICE="apache2"
   APACHE_CONF=${APACHE_SERVICE}
 else
@@ -49,8 +49,10 @@
 # Find the service binary
 if [ -x /sbin/service ]; then
   SERVICE_BIN="/sbin/service"
-else
+elif [ -x /usr/sbin/service ]; then
   SERVICE_BIN="/usr/sbin/service" # Ubuntu
+elif [ -x /sbin/rc-service ]; then
+  SERVICE_BIN="/sbin/rc-service" # OpenRC
 fi
 [ -z "$SERVICE_BIN" ] && die "Could not locate 'service' utility"