if [ -r "${SQML_CFGFILE}" ] && sh -n "${SQML_CFGFILE}"
then
- printf 'Evaluating configuration delta from file "%s"...\n' "${SQML_CFGFILE}"
+ printf 'Evaluating configuration delta from file "%s"...\n' "${SQML_CFGFILE}" >&2
eval "set -x; $(grep -E '[A-Z][A-Z_]+=' "${SQML_CFGFILE}"); set +x"
_cfg_ok=$?
set +x
if [ ${_cfg_ok} -ne 0 ]
then
- printf 'FATAL: Configuration delta in "%s" could not be evaluated without errors."\n'
+ printf 'FATAL: Configuration delta in "%s" could not be evaluated without errors."\n' >&2
exit 1
fi
fi
if ! test -r ./__sqm_lagthrottle.awk
then
- printf 'FATAL: "__sqm_lagthrottle.awk" not found; are you in the correct directory?"\n'
+ printf 'FATAL: "__sqm_lagthrottle.awk" not found; are you in the correct directory?"\n' >&2
exit 1
fi
if ! __is_num "${THRESHOLD}"
then
- printf 'FATAL: Invalid value for THRESHOLD\n'
+ printf 'FATAL: Invalid value for THRESHOLD\n' >&2
exit 1
fi
if ! __is_num "${FUDGE_MS}"
then
- printf 'FATAL: Invalid value for FUDGE_MS\n'
+ printf 'FATAL: Invalid value for FUDGE_MS\n' >&2
exit 1
fi
if ! __is_int "${PING_SLOTS_PER_PEER}"
then
- printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n'
+ printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n' >&2
exit 1
fi
if ! __is_int "${PING_INTERVAL}"
then
- printf 'FATAL: Invalid value for PING_INTERVAL\n'
+ printf 'FATAL: Invalid value for PING_INTERVAL\n' >&2
exit 1
fi
if ! __is_int "${BW_MIN_RX}"
then
- printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n'
+ printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n' >&2
exit 1
fi
if ! __is_int "${BW_MAX_RX}"
then
- printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n'
+ printf 'FATAL: Invalid value for PING_SLOTS_PER_PEER\n' >&2
exit 1
fi
read -r _bw < "${f}"
if ! __is_int "${_bw}"
then
- printf 'FATAL: Interface stats file "%s" seems bogus\n' "${f}"
+ printf 'FATAL: Interface stats file "%s" seems bogus\n' "${f}" >&2
exit 1
fi
done
do
if ! ip link show "${i}" >/dev/null
then
- printf 'FATAL: Interface "%s" seems bogus\n' "${i}"
+ printf 'FATAL: Interface "%s" seems bogus\n' "${i}" >&2
exit 1
fi
done
_qd="$(tc qdisc show dev "${i}" | awk '/^qdisc/{print $2}')"
if ! [ x"${_qd}" = xcake ]
then
- printf 'FATAL: Interface "%s" does not seem to have cake SQM set up\n' "${i}"
+ printf 'FATAL: Interface "%s" does not seem to have cake SQM set up\n' "${i}" >&2
exit 1
fi
done
bandwidth)
;;
*)
- printf 'FATAL: Invalid setting for OPTIMIZATION_PREFERENCE - choose either "bandwidth" or "latency".\n'
+ printf 'FATAL: Invalid setting for OPTIMIZATION_PREFERENCE - choose either "bandwidth" or "latency".\n' >&2
exit 1
;;
esac
relaxed)
;;
*)
- printf 'FATAL: Invalid setting for TREND_DECISION - choose either "eager" or "relaxed".\n'
+ printf 'FATAL: Invalid setting for TREND_DECISION - choose either "eager" or "relaxed".\n' >&2
exit 1
;;
esac