]>
Commit | Line | Data |
---|---|---|
729bf09f ER |
1 | #!/bin/sh |
2 | # | |
3 | # geninitrd mod: condecor | |
6e49b0b1 | 4 | FB_CON_DECOR=${FB_CON_DECOR:-no} |
729bf09f ER |
5 | |
6 | # requires splashutils package to operate | |
729bf09f ER |
7 | |
8 | # setup geninitrd module | |
9 | # @access public | |
10 | setup_mod_condecor() { | |
2c43306c ER |
11 | condecor_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs) |
12 | if [ ! -x "$condecor_geninitramfs" ]; then | |
13 | FB_CON_DECOR=no | |
14 | fi | |
15 | ||
729bf09f ER |
16 | if is_yes "$FB_CON_DECOR" && [ "$INITRDFS" != "initramfs" ]; then |
17 | warn "Using fbcondecor requires INITRDFS=initramfs; skipping fbcondecor generation" | |
18 | FB_CON_DECOR=no | |
19 | fi | |
20 | } | |
21 | ||
22 | # generate initrd fragment | |
23 | # @access public | |
24 | initrd_gen_fbcondecor() { | |
1b481849 ER |
25 | if ! is_yes "$FB_CON_DECOR"; then |
26 | return | |
27 | fi | |
729bf09f ER |
28 | debug "Generating fbcondecor" |
29 | ||
729bf09f ER |
30 | if [ -r /etc/sysconfig/splash ]; then |
31 | . /etc/sysconfig/splash | |
32 | fi | |
33 | ||
34 | if [ -z "$SPLASH_THEME" ]; then | |
35 | warn "Please configure your /etc/sysconfig/splash first." | |
36 | warn "Generating of splashes skipped." | |
37 | return | |
38 | fi | |
39 | ||
40 | if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then | |
41 | warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/splash." | |
42 | warn "Not adding fbcondecor to initramfs." | |
43 | return | |
44 | fi | |
45 | ||
2c43306c | 46 | local res |
729bf09f ER |
47 | for res in $FB_SPLASH_RESOLUTIONS; do |
48 | if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then | |
2c43306c | 49 | $condecor_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \ |
729bf09f ER |
50 | debug "Added $res $SPLASH_THEME theme to initramfs." |
51 | else | |
52 | warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped" | |
53 | fi | |
54 | done | |
55 | } |