Skip to content

Commit

Permalink
Handle errors better in get-up-state.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Hanson committed Dec 9, 2024
1 parent 7f8317a commit 7b75bd6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/dtrace/get-up-state.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/bin/bash

set -o pipefail

filename='/tmp/get-up-state.out'
final='/tmp/get-up-state.final'
rm -f $final

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

# For each session we find, get the latest line and store that in
# the result file.
Expand Down

0 comments on commit 7b75bd6

Please sign in to comment.