Annotation of /trunk/nxserver-freeedition/patches/nxserver-freeedition-3.0.0.69-magellan.patch
Parent Directory | Revision Log
Revision 381 -
(hide annotations)
(download)
Thu Oct 18 22:30:52 2007 UTC (16 years, 11 months ago) by niro
File size: 2326 byte(s)
Thu Oct 18 22:30:52 2007 UTC (16 years, 11 months ago) by niro
File size: 2326 byte(s)
-rediffed against 3.0.0.69
1 | niro | 381 | diff -Naur NX/scripts/setup/nxserver NX-magellan/scripts/setup/nxserver |
2 | --- NX/scripts/setup/nxserver 2007-09-11 10:30:16.000000000 +0200 | ||
3 | +++ NX-magellan/scripts/setup/nxserver 2007-10-19 00:32:53.000000000 +0200 | ||
4 | @@ -579,6 +579,12 @@ | ||
5 | |||
6 | removeNXinit () { | ||
7 | |||
8 | + # do nothing on magellan | ||
9 | + if [ "$system" = "magellan" ]; | ||
10 | + then | ||
11 | + return | ||
12 | + fi | ||
13 | + | ||
14 | runCommand "$RMCOMMAND -f /etc/init.d/nxserver" "Unable to remove '/etc/init.d/nxserver'" "warn" | ||
15 | |||
16 | if [ "$system" = "solaris" ]; | ||
17 | @@ -725,6 +731,12 @@ | ||
18 | |||
19 | addNXinit () { | ||
20 | |||
21 | + # do nothing on magellan | ||
22 | + if [ "$system" = "magellan" ]; | ||
23 | + then | ||
24 | + return | ||
25 | + fi | ||
26 | + | ||
27 | runCommand "cat $NODE_ROOT/scripts/init/nxserver > /etc/init.d/nxserver" "Unable to create: '/etc/init.d/nxserver'" "warn" | ||
28 | runCommand "chmod +x /etc/init.d/nxserver" "Cannot set permissions of '/etc/init.d/nxserver' file" "warn" | ||
29 | |||
30 | @@ -839,6 +851,13 @@ | ||
31 | } | ||
32 | |||
33 | addNXUserLinux () { | ||
34 | + | ||
35 | + # simply abort if the user exist. on magellan this user is already created. | ||
36 | + if id nx > /dev/null 2>&1 | ||
37 | + then | ||
38 | + return | ||
39 | + fi | ||
40 | + | ||
41 | if [ "x$system" != "xdebian" ] | ||
42 | then | ||
43 | sysuser=`useradd --help 2>&1|grep "\-r"`; | ||
44 | @@ -2488,6 +2507,11 @@ | ||
45 | system=fedora | ||
46 | fi | ||
47 | |||
48 | +if [ -f /etc/mageversion ]; | ||
49 | +then | ||
50 | + system=magellan | ||
51 | +fi | ||
52 | + | ||
53 | if [ "x$system" = "x" -a -f /etc/release ]; | ||
54 | then | ||
55 | system=solaris | ||
56 | @@ -2523,6 +2547,7 @@ | ||
57 | "fedora" ) ;; | ||
58 | "debian" ) ;; | ||
59 | "solaris" ) ;; | ||
60 | + "magellan" ) ;; | ||
61 | "" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;; | ||
62 | * ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;; | ||
63 | esac | ||
64 | @@ -2668,14 +2693,15 @@ | ||
65 | procedureUpdateServer | ||
66 | return 0 | ||
67 | fi | ||
68 | - | ||
69 | - result=`id nx 2>&1` | ||
70 | - if [ $? = 0 ]; | ||
71 | - then | ||
72 | - printMsg "Cannot add user: nx. User: nx already exists" "error" | ||
73 | - printMsg "Please try to fix the problem by reinstalling the server" "error" | ||
74 | - exit 1 | ||
75 | - fi | ||
76 | + | ||
77 | +# do not run this on magellan. the user is already installed. | ||
78 | +# result=`id nx 2>&1` | ||
79 | +# if [ $? = 0 ]; | ||
80 | +# then | ||
81 | +# printMsg "Cannot add user: nx. User: nx already exists" "error" | ||
82 | +# printMsg "Please try to fix the problem by reinstalling the server" "error" | ||
83 | +# exit 1 | ||
84 | +# fi | ||
85 | |||
86 | LOGFILE="$INSTALLOG" | ||
87 | createLogdirectory |