diff --git a/Makefile.am b/Makefile.am index da7c689427712d6e1e9752016db2ade8871e4650..b94bb28c67eb3092c9e47decbd4c844b9f21197f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -329,6 +329,7 @@ $(REPLACE_VARS_SED): Makefile stamp-directories echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \ echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \ echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \ + echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \ } > $@ # We need to create symlinks because "make distcheck" will not install Python diff --git a/devel/upload.in b/devel/upload.in index 94759e60f9c7b8276c4ccb583aae446b7cf334c4..38588914e8c01a4eafe35f0576b2b87ccf36a57a 100644 --- a/devel/upload.in +++ b/devel/upload.in @@ -27,14 +27,22 @@ set -e +PREFIX='@PREFIX@' +SYSCONFDIR='@SYSCONFDIR@' +PKGLIBDIR='@PKGLIBDIR@' + NO_RESTART= +NO_CRON= hosts= while [ "$#" -gt 0 ]; do opt="$1" case "$opt" in --no-restart) NO_RESTART=1 - ;; + ;; + --no-cron) + NO_CRON=1 + ;; -h|--help) echo "Usage: $0 [--no-restart] hosts..." exit 0 @@ -42,10 +50,10 @@ while [ "$#" -gt 0 ]; do -*) echo "Unknown option: $opt" >&2 exit 1 - ;; + ;; *) hosts="$hosts $opt" - ;; + ;; esac shift done @@ -58,39 +66,36 @@ trap 'rm -rf $TXD' EXIT # install ganeti as a real tree make install DESTDIR="$TXD" +# copy additional needed files +install -D --mode=0755 doc/examples/ganeti.initd \ + "$TXD/$SYSCONFDIR/init.d/ganeti" + +install -D --mode=0644 doc/examples/bash_completion \ + "$TXD/$SYSCONFDIR/bash_completion.d/ganeti" + +if [ -z "$NO_CRON" ]; then + install -D --mode=0644 doc/examples/ganeti.cron \ + "$TXD/$SYSCONFDIR/cron.d/ganeti" +fi + +install -D --mode=0755 doc/examples/dumb-allocator \ + "$TXD/$PKGLIBDIR/iallocators/dumb" + echo --- ( cd "$TXD" && find; ) echo --- -PREFIX='@PREFIX@' - # 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" \ - "$TXD/$PREFIX/" \ - root@${host}:$PREFIX/ & -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}... - scp $INIT_SCRIPT root@${host}:/etc/init.d/ganeti & + rsync -v -rplDc --exclude="*.py[oc]" --exclude="*.pdf" --exclude="*.html" \ + "$TXD/" \ + root@${host}:/ & done wait -if [ -f ganeti-master-cron ]; then - for host; do - echo Uploading cron files to ${host}... - scp ganeti-master-cron root@${host}:/etc/ganeti/master-cron & - done -fi -wait - if test -z "${NO_RESTART}"; then for host; do echo Restarting ganeti-noded on ${host}...