]>
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() { | |
25 | debug "Generating fbcondecor" | |
26 | ||
729bf09f ER |
27 | if [ -r /etc/sysconfig/splash ]; then |
28 | . /etc/sysconfig/splash | |
29 | fi | |
30 | ||
31 | if [ -z "$SPLASH_THEME" ]; then | |
32 | warn "Please configure your /etc/sysconfig/splash first." | |
33 | warn "Generating of splashes skipped." | |
34 | return | |
35 | fi | |
36 | ||
37 | if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then | |
38 | warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/splash." | |
39 | warn "Not adding fbcondecor to initramfs." | |
40 | return | |
41 | fi | |
42 | ||
2c43306c | 43 | local res |
729bf09f ER |
44 | for res in $FB_SPLASH_RESOLUTIONS; do |
45 | if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then | |
2c43306c | 46 | $condecor_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \ |
729bf09f ER |
47 | debug "Added $res $SPLASH_THEME theme to initramfs." |
48 | else | |
49 | warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped" | |
50 | fi | |
51 | done | |
52 | } |