]>
Commit | Line | Data |
---|---|---|
729bf09f ER |
1 | #!/bin/sh |
2 | # | |
3 | # geninitrd mod: condecor | |
4 | ||
5 | # requires splashutils package to operate | |
6 | FB_CON_DECOR=no | |
7 | ||
8 | # setup geninitrd module | |
9 | # @access public | |
10 | setup_mod_condecor() { | |
11 | if is_yes "$FB_CON_DECOR" && [ "$INITRDFS" != "initramfs" ]; then | |
12 | warn "Using fbcondecor requires INITRDFS=initramfs; skipping fbcondecor generation" | |
13 | FB_CON_DECOR=no | |
14 | fi | |
15 | } | |
16 | ||
17 | # generate initrd fragment | |
18 | # @access public | |
19 | initrd_gen_fbcondecor() { | |
20 | debug "Generating fbcondecor" | |
21 | ||
22 | if [ ! -x /usr/bin/splash_geninitramfs -a ! -x /usr/sbin/splash_geninitramfs ]; then | |
23 | warn "Failed to find splash_geninitramfs. Is splashutils package installed?" | |
24 | return | |
25 | fi | |
26 | ||
27 | local splash_geninitramfs_bin=/usr/sbin/splash_geninitramfs | |
28 | [ -f /usr/bin/splash_geninitramfs ] && splash_geninitramfs_bin=/usr/bin/splash_geninitramfs | |
29 | ||
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 | ||
46 | for res in $FB_SPLASH_RESOLUTIONS; do | |
47 | if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then | |
48 | $splash_geninitramfs_bin -c $DESTDIR -r $res $SPLASH_THEME && \ | |
49 | debug "Added $res $SPLASH_THEME theme to initramfs." | |
50 | else | |
51 | warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped" | |
52 | fi | |
53 | done | |
54 | } |