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