summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-09-09 10:11:50 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:46 +0100
commita8e71bdb038388640eeb2276f6697546aded3505 (patch)
tree7d3691f793b55319fdfb1678cdaed910bb9ee4cb /examples
parent443eb4a00a71b772ba36d81abfad00bf261e0735 (diff)
downloadvyos-live-build-a8e71bdb038388640eeb2276f6697546aded3505.tar.gz
vyos-live-build-a8e71bdb038388640eeb2276f6697546aded3505.zip
Making replace-di-banner hook to not fail when no d-i is included in the image.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/hooks/replace-di-banner.sh23
1 files changed, 13 insertions, 10 deletions
diff --git a/examples/hooks/replace-di-banner.sh b/examples/hooks/replace-di-banner.sh
index 9afcb9632..7be8682c1 100755
--- a/examples/hooks/replace-di-banner.sh
+++ b/examples/hooks/replace-di-banner.sh
@@ -16,16 +16,19 @@ 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
+ 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
+ # 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
fi