mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
Keshav: Recheck DISC if the var contains something other than /dev/*
This commit is contained in:
parent
2af5e3377a
commit
ed1a0035cf
1 changed files with 6 additions and 2 deletions
|
@ -1686,9 +1686,13 @@ autoprepare() {
|
|||
|
||||
detect_DISC() {
|
||||
|
||||
[[ "${DISC}" == "" ]] && DISC="$(findmnt "${DESTDIR}/boot" | tail -n +2 | awk '{print $2}' | sed 's/\(.\{8\}\).*/\1/')"
|
||||
if [[ "${DISC}" == "" ]] || [[ ! "$(grep '/dev/' "${DISC}")" ]]; then
|
||||
DISC="$(findmnt "${DESTDIR}/boot" | tail -n +2 | awk '{print $2}' | sed 's/\(.\{8\}\).*/\1/')"
|
||||
fi
|
||||
|
||||
[[ "${DISC}" == "" ]] && DISC="$(findmnt "${DESTDIR}/" | tail -n +2 | awk '{print $2}' | sed 's/\(.\{8\}\).*/\1/')"
|
||||
if [[ "${DISC}" == "" ]]; then
|
||||
DISC="$(findmnt "${DESTDIR}/" | tail -n +2 | awk '{print $2}' | sed 's/\(.\{8\}\).*/\1/')"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue