OSDN Git Service

fixed bootsplash
authorkokkiemouse <kokkiemouse@gmail.com>
Mon, 5 Oct 2020 13:35:08 +0000 (22:35 +0900)
committerkokkiemouse <kokkiemouse@gmail.com>
Mon, 5 Oct 2020 13:35:08 +0000 (22:35 +0900)
Signed-off-by: kokkiemouse <kokkiemouse@gmail.com>
channels/serene/airootfs/root/customize_airootfs_serene.sh
channels/share/airootfs/root/customize_airootfs.sh
channels/share/packages_plymouth.x86_64 [new file with mode: 0644]
lfbs

index d2a5887..398da47 100755 (executable)
@@ -38,3 +38,6 @@ sed -i "s/- packages/- shellprocess\n  - removeuser\n  - packages/g" /usr/share/
 sed -i "s/sb-shim/grub/g" /usr/share/calamares/modules/bootloader.conf
 sed -i "s/fedora/Serene Linux on Fedora/g" /usr/share/calamares/modules/bootloader.conf
 sed -i "s/auto/serene/g" /usr/share/calamares/settings.conf
+if [[ $boot_splash = true ]]; then
+    plymouth-set-default-theme serene-logo
+fi
\ No newline at end of file
index e061bc8..c55eb2a 100755 (executable)
@@ -139,4 +139,10 @@ sed -i "s|%USERSHELL%|'${usershell}'|g" /usr/share/calamares/modules/users.conf
 
 # Add disabling of sudo setting
 echo -e "\nremove \"/etc/sudoers.d/fedoralive\"" >> /usr/share/calamares/final-process
-
+if [[ $boot_splash = true ]]; then
+    cat <<EOF > /etc/grub.d/99_plymouth_config
+#!/usr/bin/env bash
+grubby --update-kernel=ALL --args="quiet splash"
+EOF
+    chmod +x /etc/grub.d/99_plymouth_config
+fi
diff --git a/channels/share/packages_plymouth.x86_64 b/channels/share/packages_plymouth.x86_64
new file mode 100644 (file)
index 0000000..f4d0424
--- /dev/null
@@ -0,0 +1,3 @@
+#For Plymouth 
+plymouth
+serene-plymouth-theme
\ No newline at end of file
diff --git a/lfbs b/lfbs
index 419e558..96c5f1b 100755 (executable)
--- a/lfbs
+++ b/lfbs
@@ -24,7 +24,7 @@ iso_name="Fedora"
 language="ja_JP.UTF-8"
 channel_name="serene"
 cache_dir="${script_path}/cache"
-
+bootsplash=false
 arch="x86_64"
 
 out_dir="${script_path}/out"
@@ -361,7 +361,15 @@ make_dnf_packages() {
     if [[ -f "${channels_dir}/${channel_name}/packages-${locale_name}.${arch}" ]]; then
         grep -h -v ^'#' "${channels_dir}/${channel_name}/packages-${locale_name}.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
     fi
-
+    if [[ ${bootsplash} == true ]]; then
+        if [[ -f "${channels_dir}/share/packages_plymouth.${arch}" ]]; then
+            grep -h -v ^'#' "${channels_dir}/share/packages_plymouth.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
+        fi
+        
+        if [[ -f "${channels_dir}/${channel_name}/packages_plymouth.${arch}" ]]; then
+            grep -h -v ^'#' "${channels_dir}/${channel_name}/packages_plymouth.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
+        fi
+    fi
     if [[ -s "${work_dir}/airootfs/dnfpkglist" ]]; then
         mount --bind "${cache_dir}" "${work_dir}/airootfs/dnf_cache"
         run_cmd env -i bash -c 'dnf -y --nogpgcheck -c /dnf_conf install $(echo $(<dnfpkglist))'
@@ -406,7 +414,9 @@ make_config() {
     # -k changed in AlterISO3 from passing kernel name to passing kernel configuration.
     local _airootfs_script_options _run_script
     _airootfs_script_options="-p ${liveuser_password} -u ${liveuser_name} -o ${os_name} -s ${liveuser_shell} -a ${arch} -g ${locale_gen_name} -l ${locale_name} -z ${locale_time} "
-
+    if [[ ${bootsplash} == true ]]; then
+        _airootfs_script_options="${_airootfs_script_options} -b"
+    fi
     _run_script() {
         local _file
         for _file in ${@}; do
@@ -432,7 +442,7 @@ make_squashfs() {
     mkdir -p "${bootfiles_dir}"/{grub,LiveOS,boot,isolinux}
     #generate initrd
     _msg_info "make initrd..."
-    run_cmd dracut --xz --add "dmsquash-live convertfs pollcdrom" --omit plymouth --no-hostonly --no-early-microcode /boot/initrd0 `run_cmd ls /lib/modules`
+    run_cmd dracut --xz --add "dmsquash-live convertfs pollcdrom" --no-hostonly --no-early-microcode /boot/initrd0 `run_cmd ls /lib/modules`
     cp ${work_dir}/airootfs/boot/vmlinuz-$(run_cmd ls /lib/modules) ${bootfiles_dir}/boot/vmlinuz
     mv ${work_dir}/airootfs/boot/initrd0 ${bootfiles_dir}/boot/initrd
     #cp isolinux
@@ -536,8 +546,8 @@ make_checksum() {
 # 引数解析()
 # 参考記事:https://0e0.pw/ci83 https://0e0.pw/VJlg
 
-_opt_short="w:l:o:ha:-:m:c:d"
-_opt_long="help,arch:,codename:,debug,help,lang,mirror:,out:,work,cache-only"
+_opt_short="w:l:o:hba:-:m:c:d"
+_opt_long="help,arch:,codename:,debug,help,lang,mirror:,out:,work,cache-only,bootsplash"
 OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
 
 if [[ ${?} != 0 ]]; then
@@ -552,6 +562,10 @@ while :; do
             arch="${2}"
             shift 2
             ;;
+        -b | --bootsplash)
+            bootsplash=true
+            shift 1
+            ;;
         -c | --cache)
             cache_dir="${2}"
             shift 2