Magellan Linux

Contents of /trunk/nxserver-freeedition/patches/nxserver-freeedition-3.1.0-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 543 - (show annotations) (download)
Thu Mar 27 09:11:59 2008 UTC (16 years, 1 month ago) by niro
File size: 3097 byte(s)
-re-diffed for 3.1.0.5

1 diff -Naur NX/scripts/setup/nxserver NX-magellan/scripts/setup/nxserver
2 --- NX/scripts/setup/nxserver 2008-02-13 13:21:30.000000000 +0100
3 +++ NX-magellan/scripts/setup/nxserver 2008-03-27 10:14:09.000000000 +0100
4 @@ -597,6 +597,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 @@ -743,6 +749,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 @@ -857,6 +869,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 @@ -2514,6 +2533,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 @@ -2549,6 +2573,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 @@ -2700,20 +2725,20 @@
65 fi
66 fi
67
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 - printMsg "Cannot add user: nx" "error"
75 - printMsg "User: nx already exists" "error"
76 - printMsgNoDot "To fix the problem, you may try to completely uninstall NX"
77 - printMsgNoDot "Server and install it from scratch. If this is not enough,"
78 - printMsgNoDot "please delete the nx user by using the system commands and"
79 - printMsg "proceed with a new installation of NX Server"
80 - exit 1
81 - fi
82 +# do not run this on magellan. the user is already installed.
83 +# result=`id nx 2>&1`
84 +# if [ $? = 0 ];
85 +# then
86 +## printMsg "Cannot add user: nx. User: nx already exists" "error"
87 +## printMsg "Please try to fix the problem by reinstalling the server" "error"
88 +# printMsg "Cannot add user: nx" "error"
89 +# printMsg "User: nx already exists" "error"
90 +# printMsgNoDot "To fix the problem, you may try to completely uninstall NX"
91 +# printMsgNoDot "Server and install it from scratch. If this is not enough,"
92 +# printMsgNoDot "please delete the nx user by using the system commands and"
93 +# printMsg "proceed with a new installation of NX Server"
94 +# exit 1
95 +# fi
96
97 LOGFILE="$INSTALLOG"
98 createLogdirectory