initcpiocfg: accept (but warn) for missing config file in the host

This commit is contained in:
Adriaan de Groot 2017-08-23 10:45:04 -04:00
parent 63f9c25611
commit 186f6cd1e2

View File

@ -65,8 +65,12 @@ def write_mkinitcpio_lines(hooks, modules, files, root_mount_point):
:param files:
:param root_mount_point:
"""
try:
with open("/etc/mkinitcpio.conf", "r") as mkinitcpio_file:
mklins = [x.strip() for x in mkinitcpio_file.readlines()]
except FileNotFoundError:
libcalamares.utils.debug("Could not open host file /etc/mkinitcpio.conf")
mklins = []
for i in range(len(mklins)):
if mklins[i].startswith("HOOKS"):