diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-19 03:16:03 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-19 03:16:03 +0200 |
commit | d0788d8dd8453d10446ef07c3b6d395b7a3ad0e3 (patch) | |
tree | eb9cb42d4750456014431f2e35787c82681af972 /examples/hooks/debian-installer-banner.binary | |
parent | 2d16c7e2585c52d2c5eb10c19a5f4c8a066192db (diff) | |
download | vyos-live-build-d0788d8dd8453d10446ef07c3b6d395b7a3ad0e3.tar.gz vyos-live-build-d0788d8dd8453d10446ef07c3b6d395b7a3ad0e3.zip |
Renaming example hooks to the newer filename patter that is required by live-build since a while.
Diffstat (limited to 'examples/hooks/debian-installer-banner.binary')
-rwxr-xr-x | examples/hooks/debian-installer-banner.binary | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/hooks/debian-installer-banner.binary b/examples/hooks/debian-installer-banner.binary new file mode 100755 index 000000000..61c160ca6 --- /dev/null +++ b/examples/hooks/debian-installer-banner.binary @@ -0,0 +1,34 @@ +#!/bin/sh + +# This is an binary hook for live-build(7) to overwrite the banner +# in the graphical Debian Installer. +# To enable it, copy or symlink this hook into your config/binary_local-hooks +# directory and add a replacement banner.png at: +# +# config/binary_debian-installer/banner.png +# +# The file should be a PNG image of dimensions 800 x 75. + +set -e + +if [ -e config/binary_debian-installer/banner.png ] +then + TARGET_INITRD="binary/install/gtk/initrd.gz" + REPACK_TMPDIR="binary.initrd" + + if [ -e "${TARGET_INITRD}" ] + then + # 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 + cp ../config/binary_debian-installer/banner.png ./usr/share/graphics/logo_debian.png + + find | cpio -H newc -o | gzip -9 > ../${TARGET_INITRD} + cd .. + rm -rf ${REPACK_TMPDIR} + fi +fi |