diff options
author | Daniel Baumann <daniel@debian.org> | 2009-08-30 19:15:59 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:46 +0100 |
commit | bed278a40e5bba64bc28b4eb7f6a06cec76b3cb2 (patch) | |
tree | 0b4026de8005588e280436e835f3dd365a9f1a74 | |
parent | 22f5cf5f6d795f1eb5f0db39bb0d3ba7c834644d (diff) | |
download | vyos-live-build-bed278a40e5bba64bc28b4eb7f6a06cec76b3cb2.tar.gz vyos-live-build-bed278a40e5bba64bc28b4eb7f6a06cec76b3cb2.zip |
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.
-rwxr-xr-x | examples/hooks/replace-di-banner.sh | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/examples/hooks/replace-di-banner.sh b/examples/hooks/replace-di-banner.sh index cd64cc1cd..9afcb9632 100755 --- a/examples/hooks/replace-di-banner.sh +++ b/examples/hooks/replace-di-banner.sh @@ -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 |