Enable dracut list installed modules
While looking at DIB logs, it is very hard to debug dracut issues due to missing modules, listing dracut modules will give an insight. Related-Bug: #1907457 Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com> Change-Id: I4d277bdfd648adba5a749d22d905c66b807e249a
This commit is contained in:
parent
0255291609
commit
eeb4d901a7
@ -71,7 +71,18 @@ def main():
|
|||||||
kernel_version = "%s" % kernel_search.groups(1)
|
kernel_version = "%s" % kernel_search.groups(1)
|
||||||
ramdisk_path = "/boot/%s" % kernel_set[1].strip()
|
ramdisk_path = "/boot/%s" % kernel_set[1].strip()
|
||||||
|
|
||||||
|
# list installed modules of dracut
|
||||||
|
cmdline = ['dracut', '--list-modules']
|
||||||
|
logging.debug("Calling: %s" % cmdline)
|
||||||
|
subp = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
|
||||||
|
out, err = subp.communicate()
|
||||||
|
if subp.returncode:
|
||||||
|
e = subprocess.CalledProcessError(subp.returncode, cmdline)
|
||||||
|
e.output = out
|
||||||
|
raise e
|
||||||
|
|
||||||
cmdline = ['dracut', '--force']
|
cmdline = ['dracut', '--force']
|
||||||
|
|
||||||
if modules_to_boot:
|
if modules_to_boot:
|
||||||
modules_to_boot = ' ' .join(modules_to_boot)
|
modules_to_boot = ' ' .join(modules_to_boot)
|
||||||
cmdline += ['--add', modules_to_boot]
|
cmdline += ['--add', modules_to_boot]
|
||||||
|
Loading…
Reference in New Issue
Block a user