Ignore partprobe output

This commit is contained in:
oddlama 2021-05-30 21:30:45 +02:00
parent 7133ff4484
commit f77f2a7955
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ function get_blkid_field_by_device() {
local device="$2" local device="$2"
blkid -g \ blkid -g \
|| die "Error while executing blkid -g" || die "Error while executing blkid -g"
partprobe partprobe &>/dev/null
local val local val
val="$(blkid -o export "$device")" \ val="$(blkid -o export "$device")" \
|| die "Error while executing blkid '$device'" || die "Error while executing blkid '$device'"
@ -150,7 +150,7 @@ function get_device_by_blkid_field() {
local field_value="$2" local field_value="$2"
blkid -g \ blkid -g \
|| die "Error while executing blkid -g" || die "Error while executing blkid -g"
type partprobe &>/dev/null && partprobe type partprobe &>/dev/null && partprobe &>/dev/null
local dev local dev
dev="$(blkid -o export -t "$blkid_field=$field_value")" \ dev="$(blkid -o export -t "$blkid_field=$field_value")" \
|| die "Error while executing blkid to find $blkid_field=$field_value" || die "Error while executing blkid to find $blkid_field=$field_value"