1 |
diff -Naur nxnode/NX/scripts/setup/nxnode nxnode-magellan/NX/scripts/setup/nxnode |
diff -Naur nxnode/NX/scripts/setup/nxnode nxnode-magellan/NX/scripts/setup/nxnode |
2 |
--- nxnode/NX/scripts/setup/nxnode 2010-12-21 11:08:55.000000000 +0100 |
--- nxnode/NX/scripts/setup/nxnode 2010-12-21 11:08:55.000000000 +0100 |
3 |
+++ nxnode-magellan/NX/scripts/setup/nxnode 2010-12-23 18:14:01.000000000 +0100 |
+++ nxnode-magellan/NX/scripts/setup/nxnode 2010-12-23 19:03:56.000000000 +0100 |
4 |
@@ -98,6 +98,11 @@ |
@@ -98,6 +98,12 @@ |
5 |
return 0 |
return 0 |
6 |
fi |
fi |
7 |
|
|
8 |
+ if [ -f /etc/mageversion ]; |
+ if [ -f /etc/mageversion ]; |
9 |
+ then |
+ then |
10 |
+ system=magellan |
+ system=magellan |
11 |
|
+ return 0 |
12 |
+ fi |
+ fi |
13 |
+ |
+ |
14 |
return 1 |
return 1 |
15 |
} |
} |
16 |
|
|
17 |
@@ -1957,6 +1962,9 @@ |
@@ -1957,6 +1963,9 @@ |
18 |
elif [ "$system" = "mandrake" ]; |
elif [ "$system" = "mandrake" ]; |
19 |
then |
then |
20 |
detectedSystem="Mandriva" |
detectedSystem="Mandriva" |
24 |
fi |
fi |
25 |
|
|
26 |
printMsg "Autodetected system: $detectedSystem" |
printMsg "Autodetected system: $detectedSystem" |
27 |
@@ -2171,6 +2179,7 @@ |
@@ -2171,6 +2180,7 @@ |
28 |
echo " Xandros Desktop 4.1/Xandros Server 2.0 etc." |
echo " Xandros Desktop 4.1/Xandros Server 2.0 etc." |
29 |
echo " solaris Sun Solaris 10.0 etc." |
echo " solaris Sun Solaris 10.0 etc." |
30 |
echo " fedora Fedora 10/11/12/13 etc." |
echo " fedora Fedora 10/11/12/13 etc." |
32 |
|
|
33 |
echo "$errMsg" |
echo "$errMsg" |
34 |
|
|
35 |
@@ -2309,6 +2318,7 @@ |
@@ -2309,6 +2319,7 @@ |
36 |
"debian" ) ;; |
"debian" ) ;; |
37 |
"solaris" ) ;; |
"solaris" ) ;; |
38 |
"macosx" ) ;; |
"macosx" ) ;; |
40 |
"" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;; |
"" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;; |
41 |
* ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;; |
* ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;; |
42 |
esac |
esac |
43 |
@@ -2447,6 +2457,7 @@ |
@@ -2447,6 +2458,7 @@ |
44 |
/etc/debian_release |
/etc/debian_release |
45 |
/etc/fedora-release |
/etc/fedora-release |
46 |
/etc/gentoo-release |
/etc/gentoo-release |
48 |
/etc/immunix-release |
/etc/immunix-release |
49 |
knoppix_version |
knoppix_version |
50 |
/etc/lfs-release |
/etc/lfs-release |
51 |
@@ -3826,6 +3837,12 @@ |
@@ -3826,6 +3838,12 @@ |
52 |
|
|
53 |
removeNXinit () { |
removeNXinit () { |
54 |
|
|
61 |
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ] || [ "$system" = "suse" ]; |
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ] || [ "$system" = "suse" ]; |
62 |
then |
then |
63 |
if [ -f "/sbin/chkconfig" ]; |
if [ -f "/sbin/chkconfig" ]; |
64 |
@@ -4030,6 +4047,11 @@ |
@@ -4030,6 +4048,11 @@ |
65 |
|
|
66 |
addNXinit () { |
addNXinit () { |
67 |
|
|
73 |
if [ "$system" = "macosx" ]; |
if [ "$system" = "macosx" ]; |
74 |
then |
then |
75 |
return |
return |
76 |
|
@@ -5277,18 +5300,6 @@ |
77 |
|
|
78 |
|
printOperationInfo "install" |
79 |
|
|
80 |
|
- result=`id nx 2>&1` |
81 |
|
- if [ $? = 0 ]; |
82 |
|
- then |
83 |
|
- printMsg "Cannot add user: nx" "error" |
84 |
|
- printMsg "User: nx already exists" "error" |
85 |
|
- printMsgNoDot "To fix the problem, you may try to completely uninstall NX" |
86 |
|
- printMsgNoDot "Node and install it from scratch. If this is not enough," |
87 |
|
- printMsgNoDot "please delete the nx user by using the system commands and" |
88 |
|
- printMsg "proceed with a new installation of NX Node" |
89 |
|
- exit 1 |
90 |
|
- fi |
91 |
|
- |
92 |
|
checkETCDirectory |
93 |
|
makeNXConfig |
94 |
|
|
95 |
|
@@ -5964,6 +5975,13 @@ |
96 |
|
# |
97 |
|
|
98 |
|
addNXUserLinux () { |
99 |
|
+ |
100 |
|
+ # simply abort if the user exist. on magellan this user is already created. |
101 |
|
+ if id nx > /dev/null 2>&1 |
102 |
|
+ then |
103 |
|
+ return |
104 |
|
+ fi |
105 |
|
+ |
106 |
|
if [ "x$system" != "xdebian" ] |
107 |
|
then |
108 |
|
sysuser=`$USERADDCOMMAND --help 2>&1|grep "\-r"`; |