mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-10-13 22:25:11 +08:00
fix: Show Passt output on error (#1059)
This commit is contained in:
parent
c3302e1720
commit
1ffc5c55b2
@ -324,10 +324,17 @@ configurePasst() {
|
||||
[[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
|
||||
|
||||
if ! $PASST ${PASST_OPTS:+ $PASST_OPTS} >/dev/null 2>&1; then
|
||||
local msg="Failed to start passt, reason: $?"
|
||||
[ -f "$log" ] && cat "$log"
|
||||
error "$msg"
|
||||
return 1
|
||||
|
||||
rm -f "$log"
|
||||
PASST_OPTS="${PASST_OPTS/ -q/}"
|
||||
{ $PASST ${PASST_OPTS:+ $PASST_OPTS}; rc=$?; } || :
|
||||
|
||||
if (( rc != 0 )); then
|
||||
[ -f "$log" ] && cat "$log"
|
||||
error "Failed to start passt, reason: $rc"
|
||||
return 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$PASST_DEBUG" == [Yy1]* ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user