2 BOOTSPLASH_RCSID='$Revision$ $Date:: $'
4 # geninitrd mod: bootsplash
5 BOOT_SPLASH=${BOOT_SPLASH:-no}
7 # requires bootsplash package to operate
9 # setup geninitrd module
11 setup_mod_bootsplash() {
12 bootsplash_geninitramfs=$(find_tool /bin/splash.bin)
13 if [ ! -x "$bootsplash_geninitramfs" ]; then
17 # NOTE: this check must be also in fbsplash module as the order of module load may change
18 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
19 warn "bootsplash and fbsplash are exclusive!"
23 # generate initrd fragment
25 initrd_gen_bootsplash() {
26 if ! is_yes "$BOOT_SPLASH"; then
31 debug "Generating bootsplash"
33 if [ ! -x /bin/splash.bin ]; then
34 warn "Failed to execute /bin/splash.bin. Is bootsplash package installed?"
38 if [ -r /etc/sysconfig/bootsplash ]; then
39 . /etc/sysconfig/bootsplash
42 if [ -z "$THEME" ]; then
43 warn "Please configure your /etc/sysconfig/bootsplash first."
44 warn "Generating bootsplashes skipped."
48 if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
49 warn "No BOOT_SPLASH_RESOLUTIONS specified in /etc/sysconfig/bootsplash."
50 warn "Not adding bootsplash to initrd."
54 for res in $BOOT_SPLASH_RESOLUTIONS; do
55 if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
56 $bootsplash_geninitramfs -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
57 debug "Added $res $THEME theme to initrd."
59 warn "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"