projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the new DRBD test files to the Makefile
[ganeti-local]
/
devel
/
upload.in
diff --git
a/devel/upload.in
b/devel/upload.in
index
e85587a
..
94759e6
100644
(file)
--- a/
devel/upload.in
+++ b/
devel/upload.in
@@
-26,6
+26,32
@@
# $prefix/sbin. It needs passwordless root login to the nodes.
set -e
# $prefix/sbin. It needs passwordless root login to the nodes.
set -e
+
+NO_RESTART=
+hosts=
+while [ "$#" -gt 0 ]; do
+ opt="$1"
+ case "$opt" in
+ --no-restart)
+ NO_RESTART=1
+ ;;
+ -h|--help)
+ echo "Usage: $0 [--no-restart] hosts..."
+ exit 0
+ ;;
+ -*)
+ echo "Unknown option: $opt" >&2
+ exit 1
+ ;;
+ *)
+ hosts="$hosts $opt"
+ ;;
+ esac
+ shift
+done
+
+set ${hosts}
+
TXD=`mktemp -d`
trap 'rm -rf $TXD' EXIT
TXD=`mktemp -d`
trap 'rm -rf $TXD' EXIT
@@
-49,9
+75,11
@@
for host; do
done
wait
done
wait
+INIT_SCRIPT="$TXD/ganeti.initd"
+install --mode=0755 doc/examples/ganeti.initd $INIT_SCRIPT
for host; do
echo Uploading init script to ${host}...
for host; do
echo Uploading init script to ${host}...
- scp doc/examples/ganeti.initd root@${host}:/etc/init.d/ganeti &
+ scp $INIT_SCRIPT root@${host}:/etc/init.d/ganeti &
done
wait
done
wait
@@
-63,8
+91,10
@@
if [ -f ganeti-master-cron ]; then
fi
wait
fi
wait
-for host; do
- echo Restarting ganeti-noded on ${host}...
- ssh root@${host} /etc/init.d/ganeti restart &
-done
-wait
+if test -z "${NO_RESTART}"; then
+ for host; do
+ echo Restarting ganeti-noded on ${host}...
+ ssh root@${host} /etc/init.d/ganeti restart &
+ done
+ wait
+fi