summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2009-08-09 22:50:37 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:45 +0100
commit23cbb72ab6a6212c6e293be60e037c34e2ba58ca (patch)
treeae960deaafc63ab4fc6b4c22022fca97bbe87b2d
parenteaf31e811caf8c71fbac3681d5c43b617df1ec99 (diff)
downloadlive-build-23cbb72ab6a6212c6e293be60e037c34e2ba58ca.zip
live-build-23cbb72ab6a6212c6e293be60e037c34e2ba58ca.tar.gz
Add replace-di-banner.sh example hook to replace the graphical d-i banner.
-rw-r--r--examples/hooks/replace-di-banner.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/hooks/replace-di-banner.sh b/examples/hooks/replace-di-banner.sh
new file mode 100644
index 0000000..7898f60
--- /dev/null
+++ b/examples/hooks/replace-di-banner.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# This is an binary hook for live-helper(7) to overwrite the banner
+# in the graphical Debian Installer. To enable it, coppy or symlink
+# this hook into your config/binary_local-hooks directory and add a
+# replacement banner.png at:
+#
+# config/binary_local-includes/binary/install/banner.png
+#
+# The file should be a PNG image of dimensions 800 x 75.
+
+set -e
+
+TARGET_INITRD="binary/install/gtk/initrd.gz"
+REPACK_TMPDIR="unpacked-initrd"
+
+# cpio does not have a "extract to directory", so we must change directory
+mkdir -p ${REPACK_TMPDIR}
+cd ${REPACK_TMPDIR}
+gzip -d < ../${TARGET_INITRD} | cpio -i --make-directories --no-absolute-filenames
+
+# Overwrite banner
+mv ../binary/install/banner.png ./usr/share/graphics/logo_debian.png
+
+find | cpio -H newc -o | gzip -9 > ../${TARGET_INITRD}
+cd ..
+rm -rf ${REPACK_TMPDIR}