From: Chris Gianelloni Date: Fri, 8 Sep 2006 22:28:43 +0000 (+0000) Subject: Add more error checking into the splash code and die instead of silently fail on... X-Git-Tag: v3.4.10.902~323 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b188f898ebcbca25891b27da54eb2dcfbf36d7c;p=genkernel.git Add more error checking into the splash code and die instead of silently fail on an error. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@429 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 93bea86..c5945ef 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -288,7 +288,7 @@ create_evms2_cpio(){ create_gensplash(){ if [ "${GENSPLASH}" -eq '1' ] then - if [ -x /usr/bin/splash_geninitramfs ] + if [ -x /usr/bin/splash_geninitramfs ] || [ -x /usr/sbin/splash_geninitramfs ] then [ -z "${GENSPLASH_THEME}" ] && [ -e /etc/conf.d/splash ] && source /etc/conf.d/splash [ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default @@ -296,7 +296,7 @@ create_gensplash(){ cd / local tmp="" [ -n "${GENSPLASH_RES}" ] && tmp="-r ${GENSPLASH_RES}" - splash_geninitramfs -g ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz ${tmp} ${GENSPLASH_THEME} + splash_geninitramfs -g ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz ${tmp} ${GENSPLASH_THEME} || gen_die "Could not build splash cpio archive" if [ -e "/usr/share/splashutils/initrd.splash" ]; then if [ -d "${TEMP}/initramfs-gensplash-temp" ] then @@ -304,9 +304,9 @@ create_gensplash(){ fi mkdir -p "${TEMP}/initramfs-gensplash-temp/etc" cd "${TEMP}/initramfs-gensplash-temp/" - gunzip -c ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz | cpio -idm --quiet -H newc - cp "/usr/share/splashutils/initrd.splash" "${TEMP}/initramfs-gensplash-temp/etc" - find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz + gunzip -c ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz | cpio -idm --quiet -H newc || gen_die "unpacking splash cpio" + cp -f "/usr/share/splashutils/initrd.splash" "${TEMP}/initramfs-gensplash-temp/etc" + find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-splash-${KV}.cpio.gz || gen_die "compressing splash cpio" rm -r "${TEMP}/initramfs-gensplash-temp/" fi else