From 07772eedd5a5e4a693ac22197b6b135ea93d9321 Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 10 Dec 2016 15:35:30 +0100 Subject: [PATCH] improve plymouth handling --- lib/util-iso-image.sh | 10 +++++++++- lib/util.sh | 15 ++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index ae64ce1..c26d065 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -40,8 +40,16 @@ umount_img() { fi } +has_plymouth(){ + If $(which plymouth);then + return 0 + else + return 1 + fi +} + configure_plymouth(){ - if ${plymouth_boot};then + if $(has_plymouth);then msg2 "Configuring plymouth: %s" "${plymouth_theme}" local conf=$1/etc/plymouth/plymouthd.conf sed -i -e "s/^.*Theme=.*/Theme=${plymouth_theme}/" "${conf}" diff --git a/lib/util.sh b/lib/util.sh index 4968180..695a6fa 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -401,7 +401,7 @@ load_profile_config(){ [[ -z ${pxe_boot} ]] && pxe_boot="true" [[ -z ${plymouth_boot} ]] && plymouth_boot="true" -# [[ ${initsys} == 'openrc' ]] && plymouth_boot="false" +# [[ ${initsys} == 'openrc' ]] && plymouth_boot="false" [[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true" @@ -479,12 +479,10 @@ reset_profile(){ unset autologin unset multilib unset pxe_boot - unset plymouth_boot unset nonfree_mhwd unset efi_boot_loader unset hostname unset username - unset plymouth_theme unset password unset addgroups unset enable_systemd @@ -502,6 +500,8 @@ reset_profile(){ unset chrootcfg unset netgroups unset geoip + unset plymouth_boot + unset plymouth_theme } check_profile(){ @@ -605,6 +605,13 @@ load_pkgs(){ ;; esac + local _plymouth _plymouth_rm + if ${plymouth_boot};then + _plymouth="s|>plymouth||g" + else + _plymouth_rm="s|>plymouth.*||g" + fi + local _edition _edition_rm case "${edition}" in 'sonar') @@ -642,6 +649,8 @@ load_pkgs(){ | sed "$_kernel" \ | sed "$_edition" \ | sed "$_edition_rm" \ + | sed "$_plymouth" \ + | sed "$_plymouth_rm" \ | sed "$_clean") if [[ $1 == "${packages_mhwd}" ]]; then