mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix detect_disk
This commit is contained in:
parent
25ca6b3e5d
commit
1e5e34949b
1 changed files with 7 additions and 7 deletions
|
@ -2,14 +2,14 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_detect_disk() {
|
||||
if [[ -z "${_DISK}" ]] || ! echo "${_DISK}" | grep -q '/dev/' || findmnt -vno SOURCE "${_DESTDIR}/boot"; then
|
||||
if [[ -z "${_DISK}" ]]; then
|
||||
if findmnt -vno SOURCE "${_DESTDIR}/boot"; then
|
||||
if findmnt -vno SOURCE "${_DESTDIR}/boot" | grep -qw systemd-1; then
|
||||
_DISK="$(${_LSBLK} PKNAME "$(findmnt -vno SOURCE "${_DESTDIR}/boot" | grep -vw systemd-1)")"
|
||||
else
|
||||
_DISK="$(${_LSBLK} PKNAME "$(findmnt -vno SOURCE "${_DESTDIR}/boot")")"
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${_DISK}" ]]; then
|
||||
_DISK="$(${_LSBLK} PKNAME "$(findmnt -vno SOURCE "${_DESTDIR}/")")"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue