mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-06 01:54:52 +08:00
Compare commits
2 Commits
25227944b5
...
1ffc5c55b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ffc5c55b2 | ||
|
|
c3302e1720 |
@ -324,12 +324,19 @@ configurePasst() {
|
|||||||
[[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
|
[[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
|
||||||
|
|
||||||
if ! $PASST ${PASST_OPTS:+ $PASST_OPTS} >/dev/null 2>&1; then
|
if ! $PASST ${PASST_OPTS:+ $PASST_OPTS} >/dev/null 2>&1; then
|
||||||
local msg="Failed to start passt, reason: $?"
|
|
||||||
|
rm -f "$log"
|
||||||
|
PASST_OPTS="${PASST_OPTS/ -q/}"
|
||||||
|
{ $PASST ${PASST_OPTS:+ $PASST_OPTS}; rc=$?; } || :
|
||||||
|
|
||||||
|
if (( rc != 0 )); then
|
||||||
[ -f "$log" ] && cat "$log"
|
[ -f "$log" ] && cat "$log"
|
||||||
error "$msg"
|
error "Failed to start passt, reason: $rc"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$PASST_DEBUG" == [Yy1]* ]]; then
|
if [[ "$PASST_DEBUG" == [Yy1]* ]]; then
|
||||||
tail -fn +0 "$log" --pid=$$ &
|
tail -fn +0 "$log" --pid=$$ &
|
||||||
else
|
else
|
||||||
|
|||||||
@ -62,7 +62,7 @@ CPU_CORES="${CPU_CORES// /}"
|
|||||||
[ -n "${CPU_CORES//[0-9 ]}" ] && error "Invalid amount of CPU_CORES: $CPU_CORES" && exit 15
|
[ -n "${CPU_CORES//[0-9 ]}" ] && error "Invalid amount of CPU_CORES: $CPU_CORES" && exit 15
|
||||||
|
|
||||||
if [ "$CPU_CORES" -gt "$CORES" ]; then
|
if [ "$CPU_CORES" -gt "$CORES" ]; then
|
||||||
warn "The amount for CPU_CORES (${CPU_CORES}) exceeds the amount of physical cores, so will be limited to ${CORES}."
|
warn "The amount for CPU_CORES (${CPU_CORES}) exceeds the amount of logical cores available, so will be limited to ${CORES}."
|
||||||
CPU_CORES="$CORES"
|
CPU_CORES="$CORES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user