Skip to content

Commit f50ae68

Browse files
leftwoAlan Hanson
andauthored
Handle errors in get-up-state.sh (#1787)
Fix for #1786 Handle errors if no dtrace probes are found in get-up-state.sh Co-authored-by: Alan Hanson <[email protected]>
1 parent ba95374 commit f50ae68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/dtrace/get-up-state.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ set -o pipefail
44

55
filename='/tmp/get-up-state.out'
66
final='/tmp/get-up-state.final'
7-
rm -f $final
7+
echo "" > $final
88

99
# Gather our output first.
10-
dtrace -s /opt/oxide/crucible_dtrace/get-up-state.d | awk 'NF' > "$filename"
10+
dtrace -Z -s /opt/oxide/crucible_dtrace/get-up-state.d | awk 'NF' > "$filename"
1111
if [[ $? -ne 0 ]]; then
1212
exit 1
1313
fi

0 commit comments

Comments
 (0)