![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| emergency shutdown best practices. | jsw371 | UNIX for Advanced & Expert Users | 10 | 10-09-2008 09:36 AM |
| emergency!!! pkg-config installation | jingt86 | UNIX for Dummies Questions & Answers | 0 | 10-30-2007 09:46 PM |
| Emergency boot | dags | SCO | 2 | 04-14-2005 10:00 AM |
| emergency help ! about unixware backup | luckylwf | UNIX for Dummies Questions & Answers | 1 | 11-07-2002 09:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need Emergency help with script!
I'm trying to write a script to push out to all our servers some Veritas add-ons. I want the script to push to all servers and if there server hardware matches the uname -i statement, it will install a additional add-on.. The script keeps giving me a error on line 29. Here is the script.
Please Help! I need this script working soon. install.sfmelv: installing Sun Management Center Code:
./install.sfmelv[9]: syntax error at line 29 : `done' unexpected Code:
#!/bin/ksh
PATH=/usr/bin:/usr/sbin:/opt/local/bin:/usr/local/bin:/tmp
PGM=`basename $0`
HOSTS=$1
[[ -z $HOSTS ]] && HOSTS="`grep -v \# /opt/local/etc/hosts|grep -i sunsrv114|nawk '{print $1}'`"
echo "$PGM: installing Sun Management Center"
for host in $HOSTS
do
printf "o PROCESSING HOST: %-20s\n" $host
ping $host 1>/dev/null 2>&1;
if (( $? )) ; then
echo "--Cannot contact host $host";
else
echo " --installing Sun Management Center SOLARIS SPARC AGENT on $host"
scp agent-update.bin smcseed $host:/tmp
ssh $host 'cd /tmp/ ; /tmp/agent-update.bin -s sunsmc01 -r 8080 -f smcseed -p smc4agtsparc'
sleep 15
echo " --installing Sun Management Center HALYCON MODULE on $host"
ssh $host 'cd /tmp/ ; /tmp/agent-update.bin -s sunsmc01 -r 8080 -p Hal-modules'
# Netra Servers
if [ `uname -i` = 'SUNW,SPARC-Enterprise-T5220,SUNW,Sun-Fire-V440,SUNW,Sun-Fire-V240' ];then
echo "--Sun Management Netra hardware running elpv5 will be needed on $host";
else
echo " --installing Sun Management Center ELPV5 MODULE on $host"
ssh $host 'cd /tmp/ ; /tmp/agent-update.bin -s sunsmc01 -r 8080 -p elpv5'
fi;
done line 29
Last edited by vgersh99; 10-01-2009 at 12:11 PM.. Reason: code tags, PLEASE! |
|
||||
|
First off, please use CODE-tags when you post code. Not doing so confuses not only the reader but also our automatic translation tool, which (for obvious reasons) is supposed not to translate code.
Second, there is a special forum for emergency help. In all the other parts of the board asking for emergency is considered very rude (if you have such a pressing need HIRE someone instead of asking us) and inappropriate. I'm going to close this thread until you tell me how you intend to remedy this situation. -closed- bakunin |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|