3 # geninitrd mod: fbsplash
4 FB_SPLASH=${FB_SPLASH:-no}
6 # requires splashutils package to operate
8 # setup geninitrd module
10 setup_mod_fbsplash() {
11 fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs)
12 if [ ! -x "$fbsplash_geninitramfs" ]; then
17 if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
18 warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
22 # NOTE: this check must be also in bootsplash module as the order of module load may change
23 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
24 warn "bootsplash and fbsplash are exclusive!"
28 # find modules for for fbsplash
30 find_modules_fbsplash() {
31 if ! is_yes "$FB_SPLASH"; then
38 # generate initrd fragment
40 initrd_gen_fbsplash() {
41 debug "Generating fbsplash"
43 if [ -r /etc/sysconfig/fbsplash ]; then
44 . /etc/sysconfig/fbsplash
47 if [ -z "$SPLASH_THEME" ]; then
48 warn "Please configure your /etc/sysconfig/fbsplash first."
49 warn "Generating fbsplashes skipped."
53 if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
54 warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
55 warn "Not adding fbsplash to initramfs."
60 for res in $FB_SPLASH_RESOLUTIONS; do
61 if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
62 $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
63 debug "Added $res $SPLASH_THEME theme to initramfs."
65 warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"