summaryrefslogtreecommitdiffstats
path: root/initrd/mkdxsinitrd
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-06-27 23:37:58 +0200
committerDirk von Suchodoletz2006-06-27 23:37:58 +0200
commit1f6d3f9baee4cb6ef61156ac274d042672a479c5 (patch)
treed2d4a1b213ed116476a224b841518f4260482f11 /initrd/mkdxsinitrd
parentJust a minor correction ... (diff)
downloadcore-1f6d3f9baee4cb6ef61156ac274d042672a479c5.tar.gz
core-1f6d3f9baee4cb6ef61156ac274d042672a479c5.tar.xz
core-1f6d3f9baee4cb6ef61156ac274d042672a479c5.zip
Added simple bootsplash support (SuSE only, see BootSplash wiki) ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@256 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/mkdxsinitrd')
-rwxr-xr-xinitrd/mkdxsinitrd49
1 files changed, 47 insertions, 2 deletions
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index 40f05553..996ecd9e 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -3,14 +3,14 @@
# Description: universal (distro independent) generator for initial
# ramdisks for linux diskless clients
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-06-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 27-06-2006
# Nico Dietrich
# Felix Endres
#
# Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg
# (c) 2006 - odlx.org project
#
-# Version: 0.4.0a
+# Version: 0.4.1a
# debug level of script itself
DEBUG=1
@@ -217,6 +217,50 @@ goto_script_dir()
}
+# add a bootsplash image to the initial ramdisk, only SuSE at the moment
+add_splash () {
+
+splashsizes="$SPLASH"
+splashsizes="800x600 1024x768 1280x1024 1400x1050 1600x1200"
+splash_bin=$(which splash)
+splash_image=
+THEME="SuSE"
+if [ -n "$splashsizes" -a -n "$splash_bin" ]; then
+
+ 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
+}
+
#########################################################################
# End of function declaration
@@ -589,6 +633,7 @@ fi
#########################################################################
# End of file copy procedures
+[ -n "$SPLASH" ] && add_splash
# finally create the compressed initial ramdisk cpio archive
pushd . > /dev/null 2>&1