Revision 84d01e3e snf-image-helper/common.sh
b/snf-image-helper/common.sh | ||
---|---|---|
474 | 474 |
done |
475 | 475 |
} |
476 | 476 |
|
477 |
get_ufstype() { |
|
478 |
local device ufs |
|
479 |
|
|
480 |
device="$1" |
|
481 |
ufs="$($DUMPFS_UFS "$device" | head -1 | awk '{ match ($3, /\((.+)\)/, ufs); print ufs[1] }')" |
|
482 |
|
|
483 |
case "$ufs" in |
|
484 |
UFS1) |
|
485 |
echo 44bsd |
|
486 |
;; |
|
487 |
UFS2) |
|
488 |
echo ufs2 |
|
489 |
;; |
|
490 |
*) |
|
491 |
log_error "Unsupported UFS type: \`$ufs' in device $device" |
|
492 |
echo "" |
|
493 |
;; |
|
494 |
esac |
|
495 |
} |
|
496 |
|
|
477 | 497 |
cleanup() { |
478 | 498 |
# if something fails here, it shouldn't call cleanup again... |
479 | 499 |
trap - EXIT |
... | ... | |
530 | 550 |
return 0 |
531 | 551 |
} |
532 | 552 |
|
533 |
|
|
534 | 553 |
return_success() { |
535 | 554 |
send_result_${HYPERVISOR} "SUCCESS" |
536 | 555 |
} |
Also available in: Unified diff