summaryrefslogtreecommitdiffstats
path: root/initramfs/mkdxsinitrd
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs/mkdxsinitrd')
-rwxr-xr-xinitramfs/mkdxsinitrd70
1 files changed, 26 insertions, 44 deletions
diff --git a/initramfs/mkdxsinitrd b/initramfs/mkdxsinitrd
index dde6a5f4..1aa5a6e0 100755
--- a/initramfs/mkdxsinitrd
+++ b/initramfs/mkdxsinitrd
@@ -256,60 +256,42 @@ goto_script_dir()
}
-# add a bootsplash image to the initial ramdisk, only SuSE at the moment
# theming
+# add a bootsplash image to the initial ramdisk
+# add a displaymanager theme to use
add_theme() {
theme="${theme}"
-splashsizes="640x480 800x600 1024x768 1280x1024 1400x1050 1600x1200"
-splash_image=
-splash_bin=$(chroot $ROOTDIR which splash)
-themes_dir="${SLX_SHARE_PATH}/themes/openslx/bootsplash"
+themes_dir="${SLX_SHARE_PATH}/themes/openslx"
+if [ -d "${SLX_SHARE_PATH}/themes/${theme}" ]; then
+ themes_dir="${SLX_SHARE_PATH}/themes/${theme}"
+fi
+echo -e "\n\tUsing ${themes_dir} for themes."
+
+echo -e "\tBootsplash theme found:\c"
if [ -d "${SLX_SHARE_PATH}/themes/${theme}/bootsplash" ]; then
- themes_dir="${SLX_SHARE_PATH}/themes/${theme}/bootsplash"
-elif [ -d "$ROOTDIR/etc/bootsplash/themes/${theme}" ]; then
- themes_dir="/etc/bootsplash/themes/${theme}"
-elif [ -d "$ROOTDIR/usr/share/splash/themes/${theme}" ]; then
- themes_dir="/usr/share/splash/themes/${theme}"
+ echo -e "\t\tyes"
+ cp -a ${SLX_SHARE_PATH}/splashy/* ${INSTDIR}/bin
+ mkdir -p ${INSTDIR}/etc/splashy
+ cp -a ${themes_dir}/bootsplash/* ${INSTDIR}/etc/splashy
+ any_themes=1
+else echo -e "\tno"
fi
-#fixme: very ugly ;) shouldn't do anything in $ROOTDIR/tmp
-mkdir -p $ROOTDIR/tmp/bootsplash
-cp -a $themes_dir/* $ROOTDIR/tmp/bootsplash
-themes=${themes_dir%bootsplash}
-echo -e "\n\tUsing ${themes} for themes.\n"
-themes_dir=$ROOTDIR/tmp/bootsplash
-
-if [ -n "$splashsizes" -a -n "$splash_bin" ]; then
- if [ -n "$themes_dir" -a \
- -d "$themes_dir" -o -L "$themes_dir" ]; then
- for size in $splashsizes; do
- bootsplash_picture="$themes_dir/images/bootsplash-$size.jpg"
- cfgname="$themes_dir/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#$ROOTDIR} "
- fi
- done
- echo
- else
- echo "no theme selected"
- fi
+echo -e "\tDisplaymanager theme found:\c"
+if [ -d "${SLX_SHARE_PATH}/themes/${theme}/displaymanager" ]; then
+ echo -e "\tyes"
+ cp -a ${themes_dir}/displaymanager ${INSTDIR}/usr/share/themes
+ any_themes=1
+else echo -e "\tno"
fi
-# Include bootsplash image
-for image in $splash_image; do
- # fixme: ugly hack to have the splash binary
- chroot $ROOTDIR $splash_bin -s -f $image >> ${INSTDIR}/bootsplash
-done
+if [ -z ${any_themes} ]; then
+ echo -e "Neither bootsplash nor displaymanager theme found in"
+ echo -e "\t${themes_dir}"
+fi
-rm -rf $ROOTDIR/tmp/bootsplash
-# kdm/Xdialog theme
-cp -a ${themes}* ${INSTDIR}/usr/share/themes
+echo
}