aboutsummaryrefslogtreecommitdiffstats
path: root/tmp/mkinitrd
diff options
context:
space:
mode:
Diffstat (limited to 'tmp/mkinitrd')
-rw-r--r--tmp/mkinitrd29
1 files changed, 22 insertions, 7 deletions
diff --git a/tmp/mkinitrd b/tmp/mkinitrd
index d29a497..4ff43d8 100644
--- a/tmp/mkinitrd
+++ b/tmp/mkinitrd
@@ -34,16 +34,18 @@ img_vers=""
modulefile=/etc/modules.conf
tmpdir=
-splash_script=/usr/share/bootsplash/scripts/
+splash_dir=/usr/share/bootsplash/
splash=auto
+theme=Mandrake
IMAGESIZE=100
PRESCSIMODS="scsi_mod sd_mod unknown"
fstab="/etc/fstab"
IGNOREMODS="$IGNOREMODS ppa imm ide-scsi ext2 usb-storage"
-[[ -f /etc/sysconfig/installkernel ]] && source /etc/sysconfig/installkernel
+[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash
[[ -n $SPLASH ]] && splash=$SPLASH
+[[ -n $THEME ]] && theme=$THEME
usage () {
echo "usage: `basename $0` [--version] [-v] [-f] [--ifneeded] [--preload <module>]" >&2
@@ -277,8 +279,8 @@ while [ $# -gt 0 ]; do
shift
done
-if [[ $splash == auto && -f $splash_script/detect-resolution ]];then
- splash=$( $splash_script/detect-resolution )
+if [[ $splash == auto && -f $splash_dir/scripts/detect-resolution ]];then
+ splash=$( $splash_dir/scripts/detect-resolution )
fi
if [ -z "$target" -o -z "$kernel" ]; then
@@ -405,7 +407,20 @@ for n in $basicmodules; do
findmodule $n
done
-[[ -d $splash_script ]] || splash=
+[[ -d $splash_dir/scripts ]] || splash=
+if [[ -n $splash && -n $theme ]];then
+ [[ ! -d $splash_dir/themes/$theme ]] && theme=Mandrake
+ if [[ -f $splash_dir/themes/$theme/global.config ]];then
+ if [[ $LOGO_CONSOLE == theme ]];then
+ source $splash_dir/themes/$theme/global.config
+ else #leave from the global config
+ tmpval=$LOGO_CONSOLE
+ source $splash_dir/themes/$theme/global.config
+ LOGO_CONSOLE=$tmpval
+ fi
+ fi
+fi
+
if [ "$rootfs" != "ext3" -a -z "$rootfsopts" -a -n "$ifneeded" -a -z "$MODULES" -a -z "$splash" ]; then
if [ -n "$verbose" ]; then
echo "Rootfs is not ext3, there is no rootfs special options, and"
@@ -598,6 +613,6 @@ else
cp -a $IMAGE $target
fi
-if [[ -n "$splash" && -f "$splash_script/make-boot-splash" ]];then
- $splash_script/make-boot-splash $target $splash
+if [[ -n "$splash" && -f $splash_dir/scripts/make-boot-splash ]];then
+ $splash_dir/scripts/make-boot-splash $target $splash
fi