2 # geninitrd mod: fbsplash
3 FB_SPLASH=${FB_SPLASH:-no}
5 # requires splashutils package to operate
7 # setup geninitrd module
10 fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs)
11 if [ ! -x "$fbsplash_geninitramfs" ]; then
16 if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
17 warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
21 # NOTE: this check must be also in bootsplash module as the order of module load may change
22 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
23 warn "bootsplash and fbsplash are exclusive!"
27 # find modules for for fbsplash
29 find_modules_fbsplash() {
30 if ! is_yes "$FB_SPLASH"; then
37 # generate initrd fragment
39 initrd_gen_fbsplash() {
40 if ! is_yes "$FB_SPLASH"; then
43 verbose "Generating fbsplash"
45 if [ -r /etc/sysconfig/fbsplash ]; then
46 . /etc/sysconfig/fbsplash
49 if [ -z "$SPLASH_THEME" ]; then
50 warn "Please configure your /etc/sysconfig/fbsplash first."
51 warn "Generating fbsplashes skipped."
55 if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
56 warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
57 warn "Not adding fbsplash to initramfs."
62 for res in $FB_SPLASH_RESOLUTIONS; do
63 if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
64 $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
65 verbose "Added $res $SPLASH_THEME theme to initramfs."
67 warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"