On Mon, 24 Jul 2000, Ward William E PHDN wrote:
> > Doesn't make much difference, since it's a shell script that I wrote
> > ( you don't have it :p ) that uses ssh to connect to a list of hosts,
> > and once there, use sudo to upgrade the package. I also maintain a local
> > mirror of updates on "duke" so I can pass ftp URL's in the command without
> > a lot of worry about being able to connect :)
>
> Gordon, why not post it to the list, hmmm??? Some of the rest of us might
> like to use a command like that, too. ;P
It's not too difficult, it goes something like this:
#!/bin/sh
if [ -z "$1" ]; then
echo "Use: update_hosts <rpm_to_update>"
exit 1
fi
UPDATE_HOSTS="this.host.com that.host.com"
#SUDO_PASS="thisisobviouslynotmypassword"
# this is better:
echo Enter sudo password:
read SUDO_PASS
for UHOST in UPDATE_HOSTS; do
echo Updating "$1" on $UHOST
ssh support@"${UHOST}" <<EOF
sudo rpm -Fvh ftp://local.mirror.com/pub/linux/redhat-6.2/updates/i386/"$1"
$SUDO_PASS
EOF
done
####
Just don't ever update your kernels with that script...
MSG
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.