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