refactor(os): We look for partition IDs in /dev/disk/by-partuuid (#3)

This commit is contained in:
hygienic-books 2023-03-26 19:03:20 +02:00
parent b9da09402a
commit 005fe43352

View File

@ -111,7 +111,7 @@ function get_drive_id () {
printf -- '%s' "${drive_id_single}"
return 0
fi
>2 printf -- '%s\n' 'Not exactly one '"'${1:?}'"' partition entry in /dev/disk/by-id, exiting ...'
>2 printf -- '%s\n' 'No '"'${1:?}'"' partition entry in /dev/disk/by-partuuid, exiting ...'
exit 77
}
@ -151,7 +151,7 @@ function set_zpool_password () {
}
function import_pool () {
zpool import -d '/dev/disk/by-id' -R '/mnt' "${zpool_name}" -N -f
zpool import -d '/dev/disk/by-partuuid' -R '/mnt' "${zpool_name}" -N -f
zfs load-key "${zpool_name}"
}