initcpiocfg: accept (but warn) for missing config file in the host
This commit is contained in:
parent
6e2d89afd4
commit
e3a86c6dfc
@ -65,8 +65,12 @@ def write_mkinitcpio_lines(hooks, modules, files, root_mount_point):
|
||||
:param files:
|
||||
:param root_mount_point:
|
||||
"""
|
||||
with open("/etc/mkinitcpio.conf", "r") as mkinitcpio_file:
|
||||
mklins = [x.strip() for x in mkinitcpio_file.readlines()]
|
||||
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"):
|
||||
|
Loading…
Reference in New Issue
Block a user