]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
populate-initrd: Install label-freetype plugin into initrd if available
authorFabian Vogt <fvogt@suse.com>
Fri, 6 Mar 2020 09:29:36 +0000 (10:29 +0100)
committerRay Strode <rstrode@redhat.com>
Mon, 17 Oct 2022 17:04:02 +0000 (13:04 -0400)
Now that there's a freetype plugin available, it should be installed in
the initramfs.

This commit adds the changes to plymout-populate-initrd to make that
happen.

Some contributions by Petr Vorel and Nathan Pratta Teodosio.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
scripts/plymouth-populate-initrd.in

index 2703d483c9fa9f1f8451716a3c65f45756afdfd8..a130616f0f802177ac156b43e7ccf096f636ade7 100755 (executable)
@@ -509,6 +509,15 @@ if [ "${PLYMOUTH_IMAGE_DIR}" != "${PLYMOUTH_THEME_DIR}" -a -d "${PLYMOUTH_SYSROO
      inst_recur "${PLYMOUTH_IMAGE_DIR}"
 fi
 
+if [ -f "${PLYMOUTH_PLUGIN_PATH}/label-freetype.so" ]; then
+     inst ${PLYMOUTH_PLUGIN_PATH}/label-freetype.so $INITRDDIR
+     font=$(fc-match -f %{file})
+     inst "$font" $INITRDDIR
+     # The label-freetype plugin expects it at this location
+     mkdir -p $INITRDDIR/usr/share/fonts
+     ln -s "$font" $INITRDDIR/usr/share/fonts/Plymouth.ttf
+fi
+
 if [ -L ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then
     cp -a ${PLYMOUTH_SYSROOT}${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth $INITRDDIR${PLYMOUTH_DATADIR}/plymouth/themes
 fi