[prev in list] [next in list] [prev in thread] [next in thread] 

List:       voyage-linux
Subject:    [Voyage-linux] Remote config check with ssh
From:       Beat Meier <bmeier () infovia ! com ! ar>
Date:       2006-08-01 11:54:19
Message-ID: 44CF40EB.1010508 () infovia ! com ! ar
[Download RAW message or body]

Hello

I've a problem with ssh. I try to figure out if all ap config files are 
the same.
So i have a shell script which has an outer loop which loops over all files
and an inner loop which loops over the hosts.
In the inner loop I do a ssh to the current host with the current file.

The problem is that it iterate only over the first file and I have not 
figured
out why. I have tried several ssh clients and several ssh servers (also 
dropbear)
All the same, so the problem lies in the script/ssh connection. It seems 
as the
ssh "modifes" the outer loop.
If you replace ssh with other command like echo, ls it works.

Any hints what I'm doing wrong? What does you do to check clients/ap if they
are on the same "level"?

Thanks

Beat

Here the stripped down script:

hostlist="91 101"
flist=$1

while read destfile srcfile; do
  echo "Checking file $destfile from $srcfile"
  echo "hostlist=$hostlist"
  for i in $hostlist; do
    hostname="woc${i}"
    echo "Checking $hostname"
#   echo    ssh root@192.168.99.${i} md5sum $destfile
    ssh root@192.168.99.${i} md5sum $destfile
  done
done < $flist

_______________________________________________
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic