#!/bin/bash # $HeadURL$ $LastChangedRevision$ echo "configuring environment ..." export RDW2_DB_FILE=$(pwd)/var/rdw2.sqlite export RDW2_ETC_PREFIX=$(pwd)/etc export LABEL_TOOL_REROOT_FLAG=true export LABEL_TOOL_REROOT_DIR=$(pwd)/.label-tool-reroot echo "initialising server ..." mkdir -p etc var echo 'rdw2_server_flag = True' > etc/rdw2.py rdw2 --list-sets > /dev/null echo "adding set (expect 'A') ..." echo A | { rdw2 --no-update-cron --add-set oss nightly; cat; } echo "adding client (expect 'B') ..." echo B | { rdw2 --add-client $(uname -n) Linux $(hostname --fqdn) df-in-cr; cat; } echo "adding medium (expect 'C') ..." DIR=$(mktemp -d) echo C | { rdw2 --add-medium vtape005 floating-dir df-in-map $DIR; cat; } rmdir $DIR echo "all done"