Added setfont check in mkinitcpiocfg
This commit is contained in:
parent
9f8b848631
commit
950e9d1d0a
@ -39,11 +39,22 @@ def detect_plymouth():
|
|||||||
def detect_systemd():
|
def detect_systemd():
|
||||||
"""
|
"""
|
||||||
Checks existence (runnability) of systemd in the target system.
|
Checks existence (runnability) of systemd in the target system.
|
||||||
|
|
||||||
@return True if systemd exists in the target, False otherwise
|
@return True if systemd exists in the target, False otherwise
|
||||||
"""
|
"""
|
||||||
# Used to only check existence of path /usr/bin/systemd-cat in target
|
# Used to only check existence of path /usr/bin/systemd-cat in target
|
||||||
return target_env_call(["sh", "-c", "which systemd-cat"]) == 0
|
return target_env_call(["sh", "-c", "which systemd-cat"]) == 0
|
||||||
|
|
||||||
|
|
||||||
|
def detect_setfont():
|
||||||
|
"""
|
||||||
|
Checks existence (runnability) of setfont in the target system.
|
||||||
|
|
||||||
|
@return True if setfont exists in the target, False otherwise
|
||||||
|
"""
|
||||||
|
# Used to only check existence of path /usr/bin/setfont in target
|
||||||
|
return target_env_call(["sh", "-c", "which setfont"]) == 0
|
||||||
|
|
||||||
class cpuinfo(object):
|
class cpuinfo(object):
|
||||||
"""
|
"""
|
||||||
Object describing the current CPU's characteristics. It may be
|
Object describing the current CPU's characteristics. It may be
|
||||||
@ -161,6 +172,7 @@ def find_initcpio_features(partitions, root_mount_point):
|
|||||||
"keyboard",
|
"keyboard",
|
||||||
]
|
]
|
||||||
uses_systemd = detect_systemd()
|
uses_systemd = detect_systemd()
|
||||||
|
have_setfont = detect_setfont()
|
||||||
|
|
||||||
if uses_systemd:
|
if uses_systemd:
|
||||||
hooks.insert(0, "systemd")
|
hooks.insert(0, "systemd")
|
||||||
@ -175,6 +187,7 @@ def find_initcpio_features(partitions, root_mount_point):
|
|||||||
files = []
|
files = []
|
||||||
binaries = []
|
binaries = []
|
||||||
|
|
||||||
|
if have_setfont:
|
||||||
# Fixes "setfont: KDFONTOP: Function not implemented" error
|
# Fixes "setfont: KDFONTOP: Function not implemented" error
|
||||||
binaries.append("setfont")
|
binaries.append("setfont")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user