Merge abucodonosor-plymouth

This commit is contained in:
Adriaan de Groot 2018-06-14 07:01:41 -04:00
commit 6cdb2daca3
2 changed files with 10 additions and 10 deletions

View File

@ -44,15 +44,20 @@ def modify_grub_default(partitions, root_mount_point, distributor):
dracut_bin = libcalamares.utils.target_env_call( dracut_bin = libcalamares.utils.target_env_call(
["sh", "-c", "which dracut"] ["sh", "-c", "which dracut"]
) )
have_dracut = dracut_bin == 0 # Shell exit value 0 means success plymouth_bin = libcalamares.utils.target_env_call(
["sh", "-c", "which plymouth"]
)
# Shell exit value 0 means success
have_plymouth = plymouth_bin == 0
have_dracut = dracut_bin == 0
use_splash = "" use_splash = ""
swap_uuid = "" swap_uuid = ""
swap_outer_uuid = "" swap_outer_uuid = ""
swap_outer_mappername = None swap_outer_mappername = None
if libcalamares.globalstorage.contains("hasPlymouth"): if have_plymouth:
if libcalamares.globalstorage.value("hasPlymouth"):
use_splash = "splash" use_splash = "splash"
cryptdevice_params = [] cryptdevice_params = []

View File

@ -40,14 +40,9 @@ class PlymouthController:
"/etc/plymouth/plymouthd.conf"]) "/etc/plymouth/plymouthd.conf"])
def detect(self): def detect(self):
isPlymouth = target_env_call(["which", "plymouth"]) isPlymouth = target_env_call(["sh", "-c", "which plymouth"])
debug("which plymouth exit code: {!s}".format(isPlymouth)) debug("which plymouth exit code: {!s}".format(isPlymouth))
if isPlymouth == 0:
libcalamares.globalstorage.insert("hasPlymouth", True)
else:
libcalamares.globalstorage.insert("hasPlymouth", False)
return isPlymouth return isPlymouth
def run(self): def run(self):