]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- add missing file
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 6 Apr 2009 15:11:52 +0000 (15:11 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 6 Apr 2009 15:11:52 +0000 (15:11 +0000)
svn-id: @10314

mod-condecor.sh [new file with mode: 0644]

diff --git a/mod-condecor.sh b/mod-condecor.sh
new file mode 100644 (file)
index 0000000..4fa5589
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# geninitrd mod: condecor
+
+# requires splashutils package to operate
+FB_CON_DECOR=no
+
+# setup geninitrd module
+# @access      public
+setup_mod_condecor() {
+       if is_yes "$FB_CON_DECOR" && [ "$INITRDFS" != "initramfs" ]; then
+               warn "Using fbcondecor requires INITRDFS=initramfs; skipping fbcondecor generation"
+               FB_CON_DECOR=no
+       fi
+}
+
+# generate initrd fragment
+# @access      public
+initrd_gen_fbcondecor() {
+       debug "Generating fbcondecor"
+
+       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/splash ]; then
+               . /etc/sysconfig/splash
+       fi
+
+       if [ -z "$SPLASH_THEME" ]; then
+               warn "Please configure your /etc/sysconfig/splash first."
+               warn "Generating of splashes skipped."
+               return
+       fi
+
+       if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
+               warn "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/splash."
+               warn "Not adding fbcondecor to initramfs."
+               return
+       fi
+
+       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 && \
+                       debug "Added $res $SPLASH_THEME theme to initramfs."
+               else
+                       warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
+               fi
+       done
+}
This page took 0.063887 seconds and 4 git commands to generate.