Improving replace-di-banner example hook.
First, we'll make it conditional on the existence of a replacement graphic. Second, the location of the replacement graphic shall be in the config tree, not on the binary image.
This commit is contained in:
parent
22f5cf5f6d
commit
bed278a40e
|
@ -11,17 +11,21 @@
|
|||
|
||||
set -e
|
||||
|
||||
TARGET_INITRD="binary/install/gtk/initrd.gz"
|
||||
REPACK_TMPDIR="unpacked-initrd"
|
||||
if [ -e config/binary_debian-installer/banner.png ]
|
||||
then
|
||||
TARGET_INITRD="binary/install/gtk/initrd.gz"
|
||||
REPACK_TMPDIR="binary.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
|
||||
# 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
|
||||
# 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}
|
||||
find | cpio -H newc -o | gzip -9 > ../${TARGET_INITRD}
|
||||
cd ..
|
||||
rm -rf ${REPACK_TMPDIR}
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue