3 # geninitrd mod: fbsplash
5 # requires splashutils package to operate
8 # setup geninitrd module
10 setup_mod_fbsplash() {
11 if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
12 warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
16 # NOTE: this check must be also in bootsplash module as the order of module load may change
17 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
18 warn "bootsplash and fbsplash are exclusive!"
22 # find modules for for fbsplash
24 find_modules_fbsplash() {
25 if ! is_yes "$FB_SPLASH"; then
32 # generate initrd fragment
34 initrd_gen_fbsplash() {
35 debug "Generating fbsplash"
37 if [ ! -x /usr/bin/splash_geninitramfs -a ! -x /usr/sbin/splash_geninitramfs ]; then
38 warn "Failed to find splash_geninitramfs. Is splashutils package installed?"
41 local splash_geninitramfs_bin=/usr/sbin/splash_geninitramfs
42 [ -f /usr/bin/splash_geninitramfs ] && splash_geninitramfs_bin=/usr/bin/splash_geninitramfs
44 if [ -r /etc/sysconfig/fbsplash ]; then
45 . /etc/sysconfig/fbsplash
48 if [ -z "$SPLASH_THEME" ]; then
49 warn "Please configure your /etc/sysconfig/fbsplash first."
50 warn "Generating fbsplashes skipped."
54 if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
55 warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
56 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 $splash_geninitramfs_bin -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"