fstab="/etc/fstab"
insmod="insmod"
modext=".o"
+# default bootsplash is off, if it have to be on, install bootsplash package
+BOOT_SPLASH=no
usage () {
echo "usage: `basename $0` [--version] [-v] [-f] [--ifneeded] [--preload <module>]" 1>&2
echo " [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]" 1>&2
echo " [--initrdfs=rom|ext2|cram] [--modules-conf=<modules.conf>]" 1>&2
echo " [--with-raidstart] [--without-raidstart] [--with-insmod-static]" 1>&2
- echo " [--with-mdadm-static]" 1>&2
+ echo " [--with-mdadm-static] [--without-bootsplash]" 1>&2
echo " <initrd-image> <kernel-version>" 1>&2
echo " (ex: `basename $0` /boot/initrd-2.2.5-15.img 2.2.5-15)" 1>&2
exit 1
. /etc/sysconfig/geninitrd
fi
+if [ -r /etc/sysconfig/bootsplash ] ; then
+ . /etc/sysconfig/bootsplash
+fi
+
if [ "x" = "x$INITRDFS" ] ; then
if [ "x" = "x$FS" ] ; then
# default value
--without-insmod-static)
USEINSMODSTATIC="no"
;;
+ --without-bootsplash)
+ BOOT_SPLASH="no"
+ ;;
--with=*)
BASICMODULES="$BASICMODULES `echo $1 | awk -F= '{print $2;}'`"
;;
else
cp -a "$IMAGE" "$target"
fi
+
+if is_yes "$BOOT_SPLASH"; then
+ if [ ! -x /bin/splash.bin ]; then
+ echo "Failed to execute /bin/splash.bin. Is bootsplash package installed?" 1>&2
+ elif [ -z "$THEME" ]; then
+ echo "Please configure your /etc/sysconfig/bootsplash first." 1>&2
+ echo "Generating bootsplashes skipped." 1>&2
+ else
+ for res in $BOOT_SPLASH_RESOLUTIONS; do
+ if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
+ /bin/splash.bin -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
+ [ -n "$verbose" ] && echo "Added $res $THEME theme to initrd."
+ else
+ echo "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped" 1>&2
+ fi
+ done
+ fi
+fi
+
rm -rf "$MNTIMAGE" "$MNTPOINT" "$IMAGE"