summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-05-24 16:39:02 +0200
committerDirk von Suchodoletz2006-05-24 16:39:02 +0200
commit279e1438a026cb6fed2a8a41383b861fc92baf42 (patch)
treea6b9395efce1e07e337217873576a652bbfc0e8e /initrd
parentnot all was done by me - so check the log for changes :-)) (diff)
downloadcore-279e1438a026cb6fed2a8a41383b861fc92baf42.tar.gz
core-279e1438a026cb6fed2a8a41383b861fc92baf42.tar.xz
core-279e1438a026cb6fed2a8a41383b861fc92baf42.zip
functions file for adding splash to the initramfs ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@234 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r--initrd/splash47
1 files changed, 47 insertions, 0 deletions
diff --git a/initrd/splash b/initrd/splash
new file mode 100644
index 00000000..8a73878f
--- /dev/null
+++ b/initrd/splash
@@ -0,0 +1,47 @@
+
+add_splash () {
+
+splashsizes="1024x768"
+splash_bin=
+[ -x /sbin/splash.bin ] && splash_bin=/sbin/splash.bin
+[ -x /bin/splash ] && splash_bin=/bin/splash
+splash_image=
+if [ -n "$splashsizes" -a -n "$splash_bin" ]; then
+ if [ -f /etc/sysconfig/bootsplash ]; then
+ . /etc/sysconfig/bootsplash
+ fi
+
+ themes_dir=
+ if [ -d "$ROOTDIR/etc/bootsplash/themes" ]; then
+ themes_dir="$ROOTDIR/etc/bootsplash/themes"
+ elif [ -d "$ROOTDIR/usr/share/splash/themes" ]; then
+ themes_dir="$ROOTDIR/usr/share/splash/themes"
+ fi
+
+ echo -ne "Bootsplash:\t"
+ if [ -n "$themes_dir" -a \
+ -d "$themes_dir/$THEME" -o -L "$themes_dir/$THEME" ]; then
+ for size in $splashsizes; do
+ bootsplash_picture="$themes_dir/$THEME/images/bootsplash-$size.jpg"
+ cfgname="$themes_dir/$THEME/config/bootsplash-$size.cfg"
+ if [ ! -r $cfgname ] ; then
+ echo "disabled for resolution $size"
+ elif [ ! -r $bootsplash_picture ] ; then
+ echo "no image for resolution $size"
+ else
+ echo -n "${splash_image:+, }$THEME ($size)"
+ splash_image="$splash_image $cfgname"
+ fi
+ done
+ echo
+ else
+ echo "no theme selected"
+ fi
+fi
+
+# Include bootsplash image
+for image in $splash_image; do
+ $splash_bin -s -f $image >> $INSTDIR/bootsplash
+done
+
+}