diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-11-14 14:50:55 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-11-14 14:50:55 -0200 |
commit | 2c1c916fc6b0a11ca572ede5a95e63b46fa1e61d (patch) | |
tree | e7b8ea9677150f7e234ff4e59a22a2a92f5a724e /share/hydra/mass | |
parent | dbf0e0cb984c7be0f805f58d20e65b6780dc6f77 (diff) | |
download | hydra-2c1c916fc6b0a11ca572ede5a95e63b46fa1e61d.tar.gz hydra-2c1c916fc6b0a11ca572ede5a95e63b46fa1e61d.tar.bz2 |
Nodes and mass updates
Diffstat (limited to 'share/hydra/mass')
-rwxr-xr-x | share/hydra/mass | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/share/hydra/mass b/share/hydra/mass index 06447c2..9b87d4a 100755 --- a/share/hydra/mass +++ b/share/hydra/mass @@ -17,7 +17,7 @@ function mass_loop { for node in $NODES; do echo "Issuing $COMMAND on multiple nodes..." echo "Connecting to $node..." - ssh -o ConnectTimeout=15 $node $COMMAND + ssh -o ConnectTimeout=15 $node sudo $COMMAND done } @@ -29,18 +29,17 @@ hydra_config_load BASENAME="`basename $0`" COMMAND="$*" +# Initial node list +NODES="`hydra $HYDRA nodes`" + # Validation if [ "$BASENAME" == "mass-update" ]; then - COMMAND="sudo aptitude update" + COMMAND="aptitude update" elif [ "$BASENAME" == "mass-update" ]; then - COMMAND="sudo aptitude safe-upgrade" + COMMAND="aptitude safe-upgrade" elif [ "$BASENAME" == "mass-web" ]; then - echo "Currently not implemented." - exit 1 + NODES="`hydra $HYDRA nodes web`" fi -# Build node list -NODES="`hydra $HYDRA nodes`" - # Execute commands in hosts mass_loop $COMMAND |