Fix building error with element dracut-regenerate
This fixes below building error When build centos with element dracut-regenerate on ubuntu by specifying the initrd and kernel version. ... 2021-01-12 03:44:15.758 | dracut: Cannot find module directory /lib/modules/5.4.0-58-generic/ 2021-01-12 03:44:15.759 | dracut: and --no-kernel was not specified 2021-01-12 03:44:15.765 | Traceback (most recent call last): 2021-01-12 03:44:15.766 | File "/tmp/in_target.d/finalise.d/50-dracut-regenerate", line 102, in <module> 2021-01-12 03:44:15.766 | main() 2021-01-12 03:44:15.766 | File "/tmp/in_target.d/finalise.d/50-dracut-regenerate", line 82, in main 2021-01-12 03:44:15.766 | raise e 2021-01-12 03:44:15.766 | subprocess.CalledProcessError: Command '['dracut', '--list-modules']' returned non-zero exit status 1. ... Change-Id: I87ae20b3fa2f291bb107e607137fcd7b1c0a4996
This commit is contained in:
parent
3769ef546e
commit
4c4f49abcc
@ -73,6 +73,7 @@ def main():
|
||||
|
||||
# list installed modules of dracut
|
||||
cmdline = ['dracut', '--list-modules']
|
||||
cmdline += [ramdisk_path, kernel_version]
|
||||
logging.debug("Calling: %s" % cmdline)
|
||||
subp = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
|
||||
out, err = subp.communicate()
|
||||
|
Loading…
Reference in New Issue
Block a user