summaryrefslogtreecommitdiff
path: root/examples/hooks/replace-di-banner.sh
blob: 7898f601cbc5c663b6ba13ed03de3c94e61909e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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}