]> git.pld-linux.org Git - projects/geninitrd.git/blobdiff - mod-fbsplash.sh
- cosmetics and setup like other mods
[projects/geninitrd.git] / mod-fbsplash.sh
index 9cb4b6813c2dfd896b25390994524ba52d346e26..9a0dc73c2a5632b1129ad57f37ac654c03d3a619 100644 (file)
@@ -8,6 +8,12 @@ FB_SPLASH=${FB_SPLASH:-no}
 # setup geninitrd module
 # @access      public
 setup_mod_fbsplash() {
+       fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs /usr/bin/splash_geninitramfs)
+       if [ ! -x "$fbsplash_geninitramfs" ]; then
+               FB_SPLASH=no
+               return
+       fi
+
        if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
                warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
                FB_SPLASH=no
@@ -34,13 +40,6 @@ find_modules_fbsplash() {
 initrd_gen_fbsplash() {
        debug "Generating fbsplash"
 
-       if [ ! -x /usr/bin/splash_geninitramfs -a ! -x /usr/sbin/splash_geninitramfs ]; then
-               warn "Failed to find splash_geninitramfs. Is splashutils package installed?"
-               return
-       fi
-       local splash_geninitramfs_bin=/usr/sbin/splash_geninitramfs
-       [ -f /usr/bin/splash_geninitramfs ] && splash_geninitramfs_bin=/usr/bin/splash_geninitramfs
-
        if [ -r /etc/sysconfig/fbsplash ]; then
                . /etc/sysconfig/fbsplash
        fi
@@ -57,9 +56,10 @@ initrd_gen_fbsplash() {
                return
        fi
 
+       local res
        for res in $FB_SPLASH_RESOLUTIONS; do
                if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
-                       $splash_geninitramfs_bin -c $DESTDIR -r $res $SPLASH_THEME && \
+                       $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
                        debug "Added $res $SPLASH_THEME theme to initramfs."
                else
                        warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
This page took 0.027759 seconds and 4 git commands to generate.