summaryrefslogtreecommitdiffstats
path: root/initrd
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
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')
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig37
-rwxr-xr-xinitrd/mkdxsinitrd49
-rw-r--r--initrd/splash47
3 files changed, 65 insertions, 68 deletions
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 70accfb1..11f61aa2 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -4,7 +4,7 @@
# for linux diskless clients (executed within initial
# ramdisk)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-06-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 27-06-2006
# Michael Janczyk, 31-05-2006
# Lars Mueller, 23-06-2006
# Oliver Tappe, 23-06-2006
@@ -48,11 +48,11 @@ while [ $len -le 11 ] ; do
done
echo "
WELCOME TO \n (\l)
- _____ ______ __ __ __
- / _ | _ | | | |_| |
- | | | | | | | | | | /
- | |_| | | |_| | | |___ / _
- _____/ |_______/ |______| |__| |__|
+ _____ ______ __ __ __
+ / _ | _ | | | |_| |
+ | | | | | | | | | | /
+ | |_| | | |_| | | |___ / _
+ _____/ |_______/ |______| |__| |__|
Diskless Workstation (v4.0/$dstr (c) <odlx project>
">/mnt/etc/issue
@@ -83,7 +83,8 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then
ln -sf /usr/share/vmware /mnt/var/lib/vmware
elif [ -n "${imgsrv}" ] ; then
# # more general mount script should be used here!?
- ( nfsmnt ${imgsrv} /mnt/var/lib/vmware || error "$scfg_nfs" nonfatal ) &
+ nfsmnt ${imgsrv} /mnt/var/lib/vmware || {
+ error "$scfg_nfs" nonfatal; noimg=yes; }
fi
fi
@@ -271,10 +272,17 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then
d_mkrlscript close vmware-prep ""
chmod u+x /mnt/etc/${D_INITDIR}/vmware-prep
# check here that mount finished and the important files are available
- waitfor /mnt/var/lib/vmware/templ 10000 || \
+ if [ "$noimg" = "yes" ] ; then
error "$scfg_vmdir" nonfatal
- cp /mnt/var/lib/vmware/templ/runvmware /mnt/var/X11R6/bin
- chmod 755 /mnt/var/X11R6/bin/runvmware >/dev/null 2>&1
+ else
+ # add special sessions to the display managers session menu
+ # check here that mount finished and the important files are available
+ # default kdm session. Xdialog with WM and VMware images
+ cp /mnt/var/lib/vmware/templ/runvmware /mnt/var/X11R6/bin
+ chmod 755 /mnt/var/X11R6/bin/runvmware >/dev/null 2>&1
+ cp /mnt/var/lib/vmware/templ/defaultwm /mnt/var/X11R6/bin
+ chmod 755 /mnt/var/X11R6/bin/defaultwm >/dev/null 2>&1
+ fi
config_vmware
chmod 1777 /mnt/var/run/vmware
# define a variable where gdm/kdm should look for additional sessions
@@ -284,15 +292,6 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then
Name[de]=Standard\nExec=defaultwm\nTryExec=/var/X11R6/bin/defaultwm\n\
Type=Application" >/mnt/etc/X11/sessions/default.desktop
rm /mnt/etc/vmware/not_configured 2>/dev/null
- # add special sessions to the display managers session menu
- # check here that mount finished and the important files are available
- #waitfor /mnt/var/lib/vmware/templ/runvmware 10000 || \
- # error "$scfg_vmdir" nonfatal
- # default kdm session. Xdialog with WM and VMware images
- cp /mnt/var/lib/vmware/templ/runvmware /mnt/var/X11R6/bin
- chmod 755 /mnt/var/X11R6/bin/runvmware >/dev/null 2>&1
- cp /mnt/var/lib/vmware/templ/defaultwm /mnt/var/X11R6/bin
- chmod 755 /mnt/var/X11R6/bin/defaultwm >/dev/null 2>&1
echo -e "#!/bin/sh\n#\n# file generated by ${0} at ${date}\
\n# set to black background\nxsetroot -solid \"black\"\
\nstartvm=\$(echo \$0 | sed -e \"s,.*/,,\")\
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
diff --git a/initrd/splash b/initrd/splash
deleted file mode 100644
index 8a73878f..00000000
--- a/initrd/splash
+++ /dev/null
@@ -1,47 +0,0 @@
-
-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
-
-}