2 # geninitrd mod: bootsplash
3 BOOT_SPLASH=${BOOT_SPLASH:-no}
5 # requires bootsplash package to operate
7 # setup geninitrd module
9 setup_mod_bootsplash() {
10 bootsplash_geninitramfs=$(find_tool /bin/splash.bin)
11 if [ ! -x "$bootsplash_geninitramfs" ]; then
15 # NOTE: this check must be also in fbsplash module as the order of module load may change
16 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
17 warn "bootsplash and fbsplash are exclusive!"
21 # generate initrd fragment
23 initrd_gen_bootsplash() {
24 if ! is_yes "$BOOT_SPLASH"; then
29 verbose "Generating bootsplash"
31 if [ ! -x /bin/splash.bin ]; then
32 warn "Failed to execute /bin/splash.bin. Is bootsplash package installed?"
36 if [ -r /etc/sysconfig/bootsplash ]; then
37 . /etc/sysconfig/bootsplash
40 if [ -z "$THEME" ]; then
41 warn "Please configure your /etc/sysconfig/bootsplash first."
42 warn "Generating bootsplashes skipped."
46 if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
47 warn "No BOOT_SPLASH_RESOLUTIONS specified in /etc/sysconfig/bootsplash."
48 warn "Not adding bootsplash to initrd."
52 for res in $BOOT_SPLASH_RESOLUTIONS; do
53 if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
54 $bootsplash_geninitramfs -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
55 verbose "Added $res $THEME theme to initrd."
57 warn "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"