I've been searching for a while how to upgrade ports on FreeBSD machines without really having to login to them (non-interactive). For instance, if you have 300 machines that need an update of lang/rub18 (when Ruby is only used for ports-mgmt/portupgrade one could do such a thing without any risc), it would be very easy and fast to use security/pssh for this. Something like this:
But even something 'simple' like this:
.. would be nice, if it would work.
The problem however is the fact that sometimes, but not always, somewhere along the line the process on the server seems to stop, and most of the time I'll see the program 'script' running at 100%. The ssh sessions must be terminated, and I have to login on the machine to complete the job.
My questions:
1) anyone know what's going on here?
2) am I doing something wrong, is there another way to do this?
Code:
# pssh -i -t 0 -l admin -h <list of hosts> 'sudo portupgrade -pb --batch lang/ruby18'
But even something 'simple' like this:
Code:
# for i in `cat <list of hosts>` ; do ssh $i 'sudo portupgrade -pb --batch lang/ruby18
.. would be nice, if it would work.
The problem however is the fact that sometimes, but not always, somewhere along the line the process on the server seems to stop, and most of the time I'll see the program 'script' running at 100%. The ssh sessions must be terminated, and I have to login on the machine to complete the job.
My questions:
1) anyone know what's going on here?
2) am I doing something wrong, is there another way to do this?