Annotation of /trunk/nxnode/patches/nxnode-4.0.0_pre1-magellan.patch
Parent Directory | Revision Log
Revision 1241 -
(hide annotations)
(download)
Thu Dec 23 18:32:39 2010 UTC (13 years, 9 months ago) by niro
File size: 2786 byte(s)
Thu Dec 23 18:32:39 2010 UTC (13 years, 9 months ago) by niro
File size: 2786 byte(s)
fixed patches
1 | niro | 1240 | 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 | ||
3 | niro | 1241 | +++ nxnode-magellan/NX/scripts/setup/nxnode 2010-12-23 19:03:56.000000000 +0100 |
4 | @@ -98,6 +98,12 @@ | ||
5 | niro | 1240 | return 0 |
6 | fi | ||
7 | |||
8 | + if [ -f /etc/mageversion ]; | ||
9 | + then | ||
10 | + system=magellan | ||
11 | niro | 1241 | + return 0 |
12 | niro | 1240 | + fi |
13 | + | ||
14 | return 1 | ||
15 | } | ||
16 | |||
17 | niro | 1241 | @@ -1957,6 +1963,9 @@ |
18 | niro | 1240 | elif [ "$system" = "mandrake" ]; |
19 | then | ||
20 | detectedSystem="Mandriva" | ||
21 | + elif [ "$system" = "magellan" ]; | ||
22 | + then | ||
23 | + detectedSystem="Magellan-Linux" | ||
24 | fi | ||
25 | |||
26 | printMsg "Autodetected system: $detectedSystem" | ||
27 | niro | 1241 | @@ -2171,6 +2180,7 @@ |
28 | niro | 1240 | echo " Xandros Desktop 4.1/Xandros Server 2.0 etc." |
29 | echo " solaris Sun Solaris 10.0 etc." | ||
30 | echo " fedora Fedora 10/11/12/13 etc." | ||
31 | + echo " magellan Magellan-linux 0.8.x/0.9.x/0.10.x etc." | ||
32 | |||
33 | echo "$errMsg" | ||
34 | |||
35 | niro | 1241 | @@ -2309,6 +2319,7 @@ |
36 | niro | 1240 | "debian" ) ;; |
37 | "solaris" ) ;; | ||
38 | "macosx" ) ;; | ||
39 | + "magellan" ) ;; | ||
40 | "" ) 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'" ;; | ||
42 | esac | ||
43 | niro | 1241 | @@ -2447,6 +2458,7 @@ |
44 | niro | 1240 | /etc/debian_release |
45 | /etc/fedora-release | ||
46 | /etc/gentoo-release | ||
47 | +/etc/mageversion | ||
48 | /etc/immunix-release | ||
49 | knoppix_version | ||
50 | /etc/lfs-release | ||
51 | niro | 1241 | @@ -3826,6 +3838,12 @@ |
52 | niro | 1240 | |
53 | removeNXinit () { | ||
54 | |||
55 | + # do nothing on magellan | ||
56 | + if [ "$system" = "magellan" ]; | ||
57 | + then | ||
58 | + return | ||
59 | + fi | ||
60 | + | ||
61 | if [ "$system" = "fedora" ] || [ "$system" = "redhat" ] || [ "$system" = "suse" ]; | ||
62 | then | ||
63 | if [ -f "/sbin/chkconfig" ]; | ||
64 | niro | 1241 | @@ -4030,6 +4048,11 @@ |
65 | niro | 1240 | |
66 | addNXinit () { | ||
67 | |||
68 | + # do nothing on magellan | ||
69 | + if [ "$system" = "magellan" ] ; then | ||
70 | + return; | ||
71 | + fi | ||
72 | + | ||
73 | if [ "$system" = "macosx" ]; | ||
74 | then | ||
75 | return | ||
76 | niro | 1241 | @@ -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"`; |