Keshav: Recheck DISC if the var contains something other than /dev/*

This commit is contained in:
Tobias Powalowski 2013-09-16 16:45:54 +02:00
parent 2af5e3377a
commit ed1a0035cf

View file

@ -1686,9 +1686,13 @@ autoprepare() {
detect_DISC() { 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
} }