[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] Make it easy to replace the g-i logo image



With the graphical installer, I want to replace the logo image at the
top in Debian Edu to use one with the Debian Edu logo and a picture
from a school lab.  This patch make it possible, by repackaging the
initrd to insert the replacement image.

diff -Nur debian-cd.unpatched.squeeze/tools/boot/squeeze/boot-x86 debian-cd/tools/boot/squeeze/boot-x86
--- debian-cd.unpatched.squeeze/tools/boot/squeeze/boot-x86	2010-07-08 23:21:50.000000000 +0200
+++ debian-cd/tools/boot/squeeze/boot-x86	2010-07-08 23:23:00.000000000 +0200
@@ -300,6 +302,27 @@
 			ppmtolss16 "#ffffff=7" "#000000=0" > boot$N/isolinux/splash.rle
 	fi
 
+	#added by Debian Edu patch
+	if [ "$LOGOPNG" ] ; then
+		# Add custom logo to the initrd.gz file, replacing old image
+		GTKINITRD=$CDDIR/$INSTALLDIR/gtk/initrd
+		GTKINITRDGZ=$GTKINITRD.gz
+		echo "info: Adding $LOGOPNG to $GTKINITRD"
+		INITRDDIR=$TDIR/initrd-$$
+		# Repack initrd with new image
+		mkdir -p $INITRDDIR
+		(
+			cd $INITRDDIR
+			gunzip $GTKINITRDGZ
+			mkdir -p $INITRDDIR/usr/share/graphics
+			cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png
+			echo usr/share/graphics/logo_debian.png | \
+			cpio -oA -H newc -F $GTKINITRD
+			gzip -9 $GTKINITRD
+		)
+		rm -rf $INITRDDIR
+ 	fi
+
 	sed -i "s|built on|built $BUILD_DATE; d-i|" boot$N/isolinux/f1.txt
 
 	if [ -n "$KERNEL_PARAMS" ]; then

Perhaps this should be part of the normal debian-cd code?

Happy hacking,
-- 
Petter Reinholdtsen


Reply to: