1-get-initial-setup-working #2
8
setup.sh
8
setup.sh
@ -62,7 +62,7 @@ function get_parts () {
|
|||||||
parts="$(get_partitions | jq --raw-output '.[][] | select(.parttype=="c12a7328-f81f-11d2-ba4b-00a0c93ec93b") | .path')" || exit 1
|
parts="$(get_partitions | jq --raw-output '.[][] | select(.parttype=="c12a7328-f81f-11d2-ba4b-00a0c93ec93b") | .path')" || exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
>2 printf -- '%s\n' 'Unknown partition type '"'"'"${parttype}"'"'"', exiting 1 ...'
|
>2 printf -- '%s\n' 'Unknown partition type '"'"'"${parttype}"'"'"', exiting ...'
|
||||||
exit 77
|
exit 77
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -78,7 +78,7 @@ function we_have_exactly_one_part () {
|
|||||||
if [[ "$(wc -c <<<"${parts_list}")" -gt '1' ]]; then
|
if [[ "$(wc -c <<<"${parts_list}")" -gt '1' ]]; then
|
||||||
case "${parts_count}" in
|
case "${parts_count}" in
|
||||||
0)
|
0)
|
||||||
>2 printf -- '%s\n' 'No '"${parttype^^}"' partition found. Exiting 1 ...'
|
>2 printf -- '%s\n' 'No '"${parttype^^}"' partition found. Exiting ...'
|
||||||
exit 77
|
exit 77
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
@ -88,7 +88,7 @@ function we_have_exactly_one_part () {
|
|||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
>2 printf -- '%s\n' 'Partition list does not look valid. Cowardly exiting 1 ...'
|
>2 printf -- '%s\n' 'Partition list does not look valid. Cowardly exiting ...'
|
||||||
exit 77
|
exit 77
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ function get_drive_id () {
|
|||||||
printf -- '%s' "${drive_id_single}"
|
printf -- '%s' "${drive_id_single}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
>2 printf -- '%s\n' 'Not exactly one '"'${1:?}'"' partition entry in /dev/disk/by-id, exiting 1 ...'
|
>2 printf -- '%s\n' 'Not exactly one '"'${1:?}'"' partition entry in /dev/disk/by-id, exiting ...'
|
||||||
exit 77
|
exit 77
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user