#!/bin/sh
usage() {
- local prog_name=$1
+ prog_name=$1
shift
cat <<EOF
usage:
# store absolute path before changing cwd
source_dir=$(readlink -f $source_dir)
if ! $use_existing; then
- cd $build_dir
+ cd $build_dir || exit
# seastar uses 128*8 aio in reactor for io and 10003 aio for events pooling
# for each core, if it fails to enough aio context, the seastar application
# bails out. and take other process into consideration, let's make it
# 32768 per core
- max_io=$(expr 32768 \* $(nproc))
- if test $(/sbin/sysctl --values fs.aio-max-nr) -lt $max_io; then
+ max_io=$(expr 32768 \* "$(nproc)")
+ if test "$(/sbin/sysctl --values fs.aio-max-nr)" -lt $max_io; then
sudo /sbin/sysctl -q -w fs.aio-max-nr=$max_io
fi
if $classical; then
--crimson --nodaemon --redirect-output \
--osd-args "--memory 4G"
fi
- cd -
+ cd - || exit
fi
for config_file in $config_files; do
done
if ! $use_existing; then
- cd $build_dir
+ cd $build_dir || exit
if $classical; then
$source_dir/src/stop.sh
else