Execute partprobe only if it exists (not given in gentoo chroot)

This commit is contained in:
oddlama 2021-05-30 03:18:45 +02:00
parent 09928ba3a5
commit 91dfff58c1
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 1 additions and 1 deletions

View File

@ -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"
partprobe type partprobe && partprobe
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"