summaryrefslogtreecommitdiff
blob: 34382342b863f393a61a17d41e3bf6744509e057 (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
--- scripts/setup/nxnode.orig	2006-11-05 13:37:07.000000000 +0000
+++ scripts/setup/nxnode	2006-11-05 16:02:31.000000000 +0000
@@ -1167,7 +1167,9 @@
       then
       runCommand "$RMCOMMAND -f /etc/rc0.d/K01nxsensor" "Unable to remove '/etc/rc0.d/K01nxsensor'" "warn"
       fi
-
+  elif [ "$system" = "gentoo" ]; then
+  	# do nothing; this is handled by Gentoo ebuild
+  	echo > /dev/null
   else
       if [ -h /etc/rc.d/rc3.d/S99nxsensor ];
       then
@@ -1212,6 +1214,10 @@
 
 addNXinit () {
 
+ if [ "$system" = "gentoo" ] ; then
+   return;
+ fi
+
  runCommand "cat /usr/NX/scripts/init/nxsensor > /etc/init.d/nxsensor" "Unable to create: '/etc/init.d/nxsensor'" "warn"
  runCommand "chmod +x /etc/init.d/nxsensor" "Cannot set permissions of '/etc/init.d/nxsensor' file" "warn"
 
@@ -1778,6 +1784,10 @@
   system=fedora
 fi
 
+if [ -d /usr/portage ]; then
+  system=gentoo
+fi
+
 if [ "x$system" = "x" -a -f /etc/release ];
 then
   system=solaris
@@ -1812,6 +1822,7 @@
     "fedora"             ) ;;
     "debian"             ) ;;
     "solaris"             ) ;;
+    "gentoo"            );;
     ""                 ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;;
     *                  ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;;
   esac