Ticket #593: 182

File 182, 2.5 KB (added by dlove, 9 years ago)
Line 
1Index: inst_sge
2===================================================================
3RCS file: /cvs/gridengine/source/dist/inst_sge,v
4retrieving revision 1.163
5diff -u -r1.163 inst_sge
6--- inst_sge    17 Oct 2008 14:47:59 -0000      1.163
7+++ inst_sge    6 Nov 2008 16:12:49 -0000
8@@ -574,6 +574,7 @@
9    RestoreSequenceNumberFiles $QMDIR #Restore jobseqnum and arseqnum
10    CreateSGEStartUpScripts $euid true master
11    CreateSGEStartUpScripts $euid true execd
12+   SetupDefaultUsers $euid
13    CreateSettingsFile
14    InitCA
15    SetupRcScriptNames master #New qmaster RC script/SMF
16@@ -770,6 +771,7 @@
17  AddJMXFiles
18  CreateSGEStartUpScripts $euid true master
19  CreateSGEStartUpScripts $euid true execd
20+ SetupDefaultUsers $euid
21  CreateSettingsFile
22  InitCA
23  AddSGEStartUpScript $euid master
24@@ -1451,6 +1453,7 @@
25 
26    CreateSGEStartUpScripts 0 true master
27    CreateSGEStartUpScripts 0 true execd
28+   SetupDefaultUsers 0
29   
30    $INFOTEXT "\nYour new startup scripts are created. You will find them in the\n" \
31              "directory:\n\n" \
32Index: util/install_modules/inst_common.sh
33===================================================================
34RCS file: /cvs/gridengine/source/dist/util/install_modules/inst_common.sh,v
35retrieving revision 1.153
36diff -u -r1.153 inst_common.sh
37--- util/install_modules/inst_common.sh 4 Nov 2008 08:05:15 -0000       1.153
38+++ util/install_modules/inst_common.sh 6 Nov 2008 16:12:50 -0000
39@@ -2190,14 +2190,6 @@
40 
41       rm -f $TMP_SGE_STARTUP_FILE ${TMP_SGE_STARTUP_FILE}.0 ${TMP_SGE_STARTUP_FILE}.1
42 
43-      if [ $euid = 0 -a "$ADMINUSER" != default -a $QMASTER = "install" -a $hosttype = "master" ]; then
44-         AddDefaultManager root $ADMINUSER
45-         AddDefaultOperator $ADMINUSER
46-      elif [ $euid != 0 -a $hosttype = "master" ]; then
47-         AddDefaultManager $USER
48-         AddDefaultOperator $USER
49-      fi
50-
51       $INFOTEXT "Creating >%s< script" $STARTUP_FILE_NAME
52    fi
53 
54@@ -2205,6 +2197,22 @@
55 
56 
57 #-------------------------------------------------------------------------
58+# SetupDefaultUsers: Add the default manager and operator
59+#
60+SetupDefaultUsers() {
61+   euid=$1
62+
63+   if [ $euid = 0 -a "$ADMINUSER" != default -a $QMASTER = "install" ]; then
64+      AddDefaultManager root $ADMINUSER
65+      AddDefaultOperator $ADMINUSER
66+   elif [ $euid != 0 ]; then
67+      AddDefaultManager $USER
68+      AddDefaultOperator $USER
69+   fi
70+}
71+
72+
73+#-------------------------------------------------------------------------
74 # AddSGEStartUpScript: Add startup script to rc files if root installs
75 #
76 AddSGEStartUpScript()