On Mon, May 28, 2012 at 4:05 PM, Alan McKay <[email protected]> wrote:
> OK, reading through the /etc/init.d/sgemaster script, it looks like it
> automatically figures out based on the shadow_master file whether or
> not it runs as a master or a shadow, is that right?
Upon further examination of that script, maybe not.
But it looks like I can add a few lines before "MAIN Procedure" that will
check $0 and if it is sgemaster than run as master, or if it is sgeshadow
then run as shadow.
Is that a reasonable approach?
I would like put it right after the below for loop and set the qmaster and
shadowd variables.
if [ "$#" -gt 3 -o "$1" = "-h" -o "$1" = "help" ]; then
usage
fi
startup=true
qmaster=true
shadowd=true
qstd=false
migrate_qmaster=false
softstop=false
noSMF=false
for i in $*; do
if [ "$i" = start ]; then
startup=true
elif [ "$i" = stop ]; then
startup=false
elif [ "$i" = softstop ]; then
startup=false
softstop=true
elif [ "$i" = -qmaster ]; then
qmaster=true
shadowd=false
elif [ "$i" = -shadowd ]; then
qmaster=false
shadowd=true
elif [ "$i" = -migrate ]; then
migrate_qmaster=true
qmaster=true
shadowd=false
elif [ "$i" = -nosmf ]; then
noSMF=true
else
usage
fi
done
--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users