dracut: add a safety check preventing qubes_cow_setup.sh running in dom0

Theoretically it shouldn't be a problem, because module isn't installed
in initramfs by default (in dom0), but since such error would be fatal
to dom0 (will prevent it from booting), add a safety check for it.

Probably it will be required when (if) we migrate dom0 to Debian
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-09 23:03:34 +01:00
parent 3cd77e4f70
commit 64331d7e09
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -41,6 +41,11 @@ fi
info "Qubes initramfs script here:" info "Qubes initramfs script here:"
if ! grep -q 'root=[^ ]*dmroot' /proc/cmdline; then
warn "dmroot not requested, probably not a Qubes VM"
exit 0
fi
if [ -e /dev/mapper/dmroot ] ; then if [ -e /dev/mapper/dmroot ] ; then
die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!" die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
fi fi