CLIENT_FILE="client.txt client_plain.txt dbench_client"
if ! which dbench > /dev/null 2>&1 ; then
[ "$MISSING_DBENCH_OK" ] || { error "$0 : $(hostname) dbench is not installed !" && exit 3; }
- skip "$0 : $(hostname) dbench is not installed"
+ skip_env "$0 : $(hostname) dbench is not installed"
exit 0
fi
CLIENT=""
fi
[ ! -s "$CLIENT" ] && \
- skip "$0 : $(hostname) no client file found for dbench DBENCH_LIB=$DBENCH_LIB SRC=$SRC" && \
+ skip_env "$0 : $(hostname) no client file found for dbench DBENCH_LIB=$DBENCH_LIB SRC=$SRC" && \
exit 0
[ ! -s "$TGT" ] && echo "copying $CLIENT to $TGT" && cp $CLIENT $TGT
echo "copying necessary libs to $DIR"
cp `which dbench` $DIR
LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///')
- (cd / && tar chf - $LIBS71) | (cd $DIR && tar xvf -)
- [ $? != 0 ] && echo "can't copy libs $LIBS71 to $DIR" && exit 1
+ tar -C / -chf - $LIBS71 | tar -C $DIR -xvf -
+ if [ "${PIPESTATUS[*]}" != "0 0" ]; then
+ echo "can't copy libs $LIBS71 to $DIR"
+ rm -f $DIR/dbench
+ exit 1
+ fi
RUN="chroot $DIR"
PREFIX="in"
PATH=.:/:$PATH