]> git.pld-linux.org Git - projects/geninitrd.git/blame - mod-fbsplash.sh
truncate the date to cut out locale formats
[projects/geninitrd.git] / mod-fbsplash.sh
CommitLineData
bf6d9c64 1#!/bin/sh
476f99fc 2RCSID='$Revision$ $Date:: $'
05c474b5 3
bf6d9c64 4# geninitrd mod: fbsplash
6e49b0b1 5FB_SPLASH=${FB_SPLASH:-no}
bf6d9c64
ER
6
7# requires splashutils package to operate
bf6d9c64
ER
8
9# setup geninitrd module
10# @access public
11setup_mod_fbsplash() {
2c43306c
ER
12 fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs)
13 if [ ! -x "$fbsplash_geninitramfs" ]; then
14 FB_SPLASH=no
15 return
16 fi
17
bf6d9c64
ER
18 if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
19 warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
20 FB_SPLASH=no
21 fi
22
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!"
26 fi
27}
28
29# find modules for for fbsplash
30# @access public
31find_modules_fbsplash() {
32 if ! is_yes "$FB_SPLASH"; then
33 return
34 fi
35
36 find_module "-evdev"
37}
38
39# generate initrd fragment
40# @access public
41initrd_gen_fbsplash() {
1b481849
ER
42 if ! is_yes "$FB_SPLASH"; then
43 return
44 fi
bf6d9c64
ER
45 debug "Generating fbsplash"
46
bf6d9c64
ER
47 if [ -r /etc/sysconfig/fbsplash ]; then
48 . /etc/sysconfig/fbsplash
49 fi
50
51 if [ -z "$SPLASH_THEME" ]; then
52 warn "Please configure your /etc/sysconfig/fbsplash first."
53 warn "Generating fbsplashes skipped."
54 return
55 fi
56
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."
60 return
61 fi
62
2c43306c 63 local res
bf6d9c64
ER
64 for res in $FB_SPLASH_RESOLUTIONS; do
65 if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
2c43306c 66 $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
bf6d9c64
ER
67 debug "Added $res $SPLASH_THEME theme to initramfs."
68 else
69 warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
70 fi
71 done
72}
This page took 0.040428 seconds and 4 git commands to generate.