Make sure we return a message when dracut or initramfs fail
This commit is contained in:
parent
388363c1f2
commit
1f6feb9417
@ -22,8 +22,11 @@ import libcalamares
|
|||||||
from libcalamares.utils import check_chroot_call
|
from libcalamares.utils import check_chroot_call
|
||||||
|
|
||||||
def run_dracut():
|
def run_dracut():
|
||||||
check_chroot_call(['dracut', '-f'])
|
return check_chroot_call(['dracut', '-f'])
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
run_dracut()
|
returnCode = run_dracut()
|
||||||
return None
|
if returnCode != 0:
|
||||||
|
return ("Failed to run dracut on the target", "The exit code was {}".format(returnCode))
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,5 +20,6 @@
|
|||||||
from libcalamares.utils import check_chroot_call
|
from libcalamares.utils import check_chroot_call
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
check_chroot_call(["update-initramfs", "-k", "all", "-u"])
|
returnCode = check_chroot_call(["update-initramfs", "-k", "all", "-u"])
|
||||||
return None
|
if returnCode != 0:
|
||||||
|
return ("Failed to run update-initramfs on the target", "The exit code was {}".format(returnCode))
|
||||||
|
Loading…
Reference in New Issue
Block a user