3
# SGE configuration script (Installation/Uninstallation/Upgrade/Downgrade)
4
# Scriptname: inst_qmaster_uninst.sh
7
##########################################################################
9
# The Contents of this file are made available subject to the terms of
10
# the Sun Industry Standards Source License Version 1.2
12
# Sun Microsystems Inc., March, 2001
15
# Sun Industry Standards Source License Version 1.2
16
# =================================================
17
# The contents of this file are subject to the Sun Industry Standards
18
# Source License Version 1.2 (the "License"); You may not use this file
19
# except in compliance with the License. You may obtain a copy of the
20
# License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
22
# Software provided under this License is provided on an "AS IS" basis,
23
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
24
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
25
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
26
# See the License for the specific provisions governing your rights and
27
# obligations concerning the Software.
29
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
31
# Copyright: 2001 by Sun Microsystems, Inc.
33
# All Rights Reserved.
35
##########################################################################
42
$INFOTEXT -u "Uninstalling qmaster host"
43
$INFOTEXT -n "You're going to uninstall the qmaster host now. If you are not sure,\n" \
44
"what you are doing, please stop with <CTRL-C>. This procedure will, remove\n" \
45
"the complete cluster configuration and all spool directories!\n" \
46
"Please make a backup from your cluster configuration!\n\n"
47
if [ $AUTO = "false" ]; then
48
$INFOTEXT -n -ask "y" "n" -def "n" "Do you want to uninstall the master host? [n] >> "
52
$INFOTEXT -n "We're going to uninstall the master host now!\n"
61
CheckRegisteredExecd()
63
$INFOTEXT -n "Checking Running Execution Hosts\n"
64
$INFOTEXT -log -n "Checking Running Execution Hosts\n"
66
registered=`qconf -sel`
68
if [ "$registered" = "" ]; then
71
$INFOTEXT "Found registered execution hosts, exiting uninstallation!\n"
72
$INFOTEXT -log "Found registered execution hosts, exiting uninstallation!\n"
77
$INFOTEXT "There are no running execution host registered!\n"
78
$INFOTEXT -log "There are no running execution host registered!\n"
86
euid=`$SGE_UTILBIN/uidgid -euid`
89
if [ "$SGE_ENABLE_SMF" != "true" ]; then
90
$INFOTEXT "Shutting down qmaster!"
91
$INFOTEXT -log "Shutting down qmaster!"
92
spool_dir_master=`cat $SGE_ROOT/$SGE_CELL/common/bootstrap | grep qmaster_spool_dir | awk '{ print $2 }'`
93
master_pid=`cat $spool_dir_master/qmaster.pid`
98
while [ $ret -eq 0 ]; do
100
if [ -f $master_pid ]; then
101
$SGE_UTILBIN/checkprog $master_pid sge_qmaster > /dev/null
106
$INFOTEXT "sge_qmaster is going down ...., please wait!"
109
$INFOTEXT "sge_qmaster is down!"
112
master_spool=`cat $SGE_ROOT/$SGE_CELL/common/bootstrap | grep qmaster_spool_dir | awk '{ print $2 }'`
114
RemoveRcScript $HOST master $euid
116
$INFOTEXT "Removing qmaster spool directory!"
117
$INFOTEXT -log "Removing qmaster spool directory!"
119
ExecuteAsAdmin $RM $master_spool
121
berkeley_spool=`cat $SGE_ROOT/$SGE_CELL/common/bootstrap | grep spooling_params | awk '{ print $2 }'`
123
$INFOTEXT "Removing berkeley spool directory!"
124
$INFOTEXT -log "Removing berkeley spool directory!"
125
ExecuteAsAdmin $RM $berkeley_spool
127
$INFOTEXT "Removing %s directory!" $SGE_CELL
128
$INFOTEXT -log "Removing %s directory!" $SGE_CELL
129
ExecuteAsAdmin $RM $SGE_CELL