2 RCSID='$Revision$ $Date:: $'
4 # geninitrd mod: fbsplash
5 FB_SPLASH=${FB_SPLASH:-no}
7 # requires splashutils package to operate
9 # setup geninitrd module
11 setup_mod_fbsplash() {
12 fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs)
13 if [ ! -x "$fbsplash_geninitramfs" ]; then
18 if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
19 warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
23 # NOTE: this check must be also in bootsplash module as the order of module load may change
24 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
25 warn "bootsplash and fbsplash are exclusive!"
29 # find modules for for fbsplash
31 find_modules_fbsplash() {
32 if ! is_yes "$FB_SPLASH"; then
39 # generate initrd fragment
41 initrd_gen_fbsplash() {
42 if ! is_yes "$FB_SPLASH"; then
45 debug "Generating fbsplash"
47 if [ -r /etc/sysconfig/fbsplash ]; then
48 . /etc/sysconfig/fbsplash
51 if [ -z "$SPLASH_THEME" ]; then
52 warn "Please configure your /etc/sysconfig/fbsplash first."
53 warn "Generating fbsplashes skipped."
57 if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
58 warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
59 warn "Not adding fbsplash to initramfs."
64 for res in $FB_SPLASH_RESOLUTIONS; do
65 if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
66 $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
67 debug "Added $res $SPLASH_THEME theme to initramfs."
69 warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"