#!/bin/bash # Wrapper for calling mput with the right environement # It loads the /etc/profile.d/cluster.sh for getting the right # environnement before calling the real mput PROFILE=/etc/profile.d/cluster.sh RSHP_PATH=/usr/bin RSHP_ARGS="" NODES="" if [ -f $PROFILE ]; then source $PROFILE if [ $1 == "-u" ]; then NODES=$(perl -Mcluster_set_admin -e "nka_from_urpmig($2)") shift; shift; else NODES=$(perl -Mcluster_set_admin -e "nka_from_urpmig("")") fi if [ $1 == "-v" ]; then RSHP_ARGS="$RSHP_ARGS $1" shift; fi exec $RSHP_PATH/mput $NODES $RSHP_ARGS -- $@ else echo "This option is only available on the clustering product" exit fi