Commit f662d936 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Disable pipefail in get_ufstype()

This is needed because piping the dumpfs command with head will
trigger a SIGPIPE.
parent fbd60dc9
......@@ -618,10 +618,18 @@ umount_all() {
}
get_ufstype() {
local device ufs
local device ufs pipefail
device="$1"
pipefail=$(set -o | grep pipefail | cut -f2)
if [ "$pipefail" = on ]; then
set +o pipefail
fi
ufs="$($DUMPFS_UFS "$device" | head -1 | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }')"
if [ "$pipefail" = on ]; then
set -o pipefail
fi
case "$ufs" in
UFS1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment