TXD=`mktemp -d`
trap 'rm -rf $TXD' EXIT
+if [[ -f /proc/cpuinfo ]]; then
+ cpu_count=$(grep -E -c '^processor[[:space:]]*:' /proc/cpuinfo)
+ make_args=-j$(( cpu_count + 1 ))
+else
+ make_args=
+fi
+
# install ganeti as a real tree
-make install DESTDIR="$TXD"
+make $make_args install DESTDIR="$TXD"
# copy additional needed files
+[ -f doc/examples/ganeti.initd ] && \
install -D --mode=0755 doc/examples/ganeti.initd \
"$TXD/$SYSCONFDIR/init.d/ganeti"
+[ -f doc/examples/bash_completion ] && \
install -D --mode=0644 doc/examples/bash_completion \
"$TXD/$SYSCONFDIR/bash_completion.d/ganeti"
-if [ -z "$NO_CRON" ]; then
+if [ -f doc/examples/ganeti.cron -a -z "$NO_CRON" ]; then
install -D --mode=0644 doc/examples/ganeti.cron \
"$TXD/$SYSCONFDIR/cron.d/ganeti"
fi
+[ -f doc/examples/dumb-allocator ] && \
install -D --mode=0755 doc/examples/dumb-allocator \
"$TXD/$PKGLIBDIR/iallocators/dumb"
# and now put it under $prefix on the target node(s)
for host; do
echo Uploading code to ${host}...
- rsync -v -rlDc --exclude="*.py[oc]" --exclude="*.pdf" --exclude="*.html" \
+ rsync -v -rlDc \
+ -e "ssh -oBatchMode=yes" \
+ --exclude="*.py[oc]" --exclude="*.pdf" --exclude="*.html" \
"$TXD/" \
root@${host}:/ &
done
if test -z "${NO_RESTART}"; then
for host; do
echo Restarting ganeti-noded on ${host}...
- ssh root@${host} /etc/init.d/ganeti restart &
+ ssh -oBatchMode=yes root@${host} /etc/init.d/ganeti restart &
done
wait
fi