Created
March 11, 2014 03:44
-
-
Save informationsea/9479125 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function run() { | |
$@ | |
if test $? -ne 0; then | |
echo "Failed $@" | |
exit 1 | |
fi | |
} | |
function header() { | |
echo "========================================" | |
echo $1 | |
echo "========================================" | |
} | |
function header2() { | |
echo "===== $1 =====" | |
} | |
header "Complex Configuration" | |
run qconf -sc | |
header "Host configuration" | |
HOSTS=`run qconf -sconfl` | |
echo $HOSTS | |
header2 "global" | |
run qconf -sconf global | |
N=0 | |
for i in $HOSTS; do | |
header2 $i | |
run qconf -sconf $i | |
N=`expr $N + 1` | |
if [ $N -ge 10 ]; then | |
break | |
fi | |
sleep 0.2 | |
done | |
header "Execution Hosts" | |
HOSTS=`run qconf -sel` | |
echo $HOSTS | |
N=0 | |
for i in $HOSTS; do | |
header2 $i | |
run qconf -se $i | |
N=`expr $N + 1` | |
if [ $N -ge 10 ]; then | |
break | |
fi | |
sleep 0.2 | |
done | |
header "Administration Hosts" | |
run qconf -sh | |
header "Quota" | |
QUOTA=`run qconf -srqsl` | |
echo $QUOTA | |
for i in $QUOTA; do | |
header2 $i | |
run qconf -srqs $i | |
done | |
header "Parallel Environment" | |
PE=`run qconf -spl` | |
echo $PE | |
for i in $PE; do | |
header2 $i | |
qconf -sp $i | |
sleep 0.2 | |
done | |
header "Queue" | |
Q=`run qconf -sql` | |
echo $Q | |
for i in $Q; do | |
header2 $i | |
qconf -sq $i | |
sleep 0.2 | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment