]> git.pld-linux.org Git - projects/geninitrd.git/blame - mod-bootsplash.sh
Don't run ldd on dynamic linker
[projects/geninitrd.git] / mod-bootsplash.sh
CommitLineData
f12972bc 1#!/bin/sh
c34c6a69 2BOOTSPLASH_RCSID='$Revision$ $Date:: $'
05c474b5 3
f12972bc 4# geninitrd mod: bootsplash
6e49b0b1 5BOOT_SPLASH=${BOOT_SPLASH:-no}
f12972bc
ER
6
7# requires bootsplash package to operate
f12972bc
ER
8
9# setup geninitrd module
10# @access public
11setup_mod_bootsplash() {
2c43306c
ER
12 bootsplash_geninitramfs=$(find_tool /bin/splash.bin)
13 if [ ! -x "$bootsplash_geninitramfs" ]; then
14 BOOT_SPLASH=no
15 fi
16
f12972bc
ER
17 # NOTE: this check must be also in fbsplash module as the order of module load may change
18 if is_yes "$FB_SPLASH" && is_yes "$BOOT_SPLASH"; then
19 warn "bootsplash and fbsplash are exclusive!"
20 fi
21}
22
23# generate initrd fragment
24# @access public
25initrd_gen_bootsplash() {
1b481849
ER
26 if ! is_yes "$BOOT_SPLASH"; then
27 return
28 fi
f12972bc
ER
29 local target="$1"
30
31 debug "Generating bootsplash"
32
33 if [ ! -x /bin/splash.bin ]; then
34 warn "Failed to execute /bin/splash.bin. Is bootsplash package installed?"
35 return
36 fi
37
38 if [ -r /etc/sysconfig/bootsplash ]; then
39 . /etc/sysconfig/bootsplash
40 fi
41
42 if [ -z "$THEME" ]; then
43 warn "Please configure your /etc/sysconfig/bootsplash first."
44 warn "Generating bootsplashes skipped."
45 return
46 fi
47
48 if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
49 warn "No BOOT_SPLASH_RESOLUTIONS specified in /etc/sysconfig/bootsplash."
50 warn "Not adding bootsplash to initrd."
51 fi
52
2c43306c 53 local res
f12972bc
ER
54 for res in $BOOT_SPLASH_RESOLUTIONS; do
55 if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
2c43306c 56 $bootsplash_geninitramfs -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
f12972bc
ER
57 debug "Added $res $THEME theme to initrd."
58 else
59 warn "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"
60 fi
61 done
62}
This page took 0.040907 seconds and 4 git commands to generate.