aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-02-26 11:22:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-02-26 11:22:13 +0000
commitea1f2a0a07862b6aa5e47dfac97042a3f21e13cd (patch)
treeb92b79a76fa099f3df7fa42ab1faa7bb3563d821 /scripts
parente91a970cb5b9ec3ceb68bc325744d69f4f73eb9b (diff)
downloadbootsplash-ea1f2a0a07862b6aa5e47dfac97042a3f21e13cd.tar
bootsplash-ea1f2a0a07862b6aa5e47dfac97042a3f21e13cd.tar.gz
bootsplash-ea1f2a0a07862b6aa5e47dfac97042a3f21e13cd.tar.bz2
bootsplash-ea1f2a0a07862b6aa5e47dfac97042a3f21e13cd.tar.xz
bootsplash-ea1f2a0a07862b6aa5e47dfac97042a3f21e13cd.zip
create make-boot-splash-raw out of make-boot-splash
(to be used by mkcd)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile2
-rwxr-xr-xscripts/make-boot-splash45
-rwxr-xr-xscripts/make-boot-splash-raw49
3 files changed, 53 insertions, 43 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index aab60d6..44686b0 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -1,5 +1,5 @@
PL=remove-boot-splash
-SH=make-boot-splash rewritejpeg switch-themes remove-theme
+SH=make-boot-splash make-boot-splash-raw rewritejpeg switch-themes remove-theme
SBIN=splash.sh bootanim
SYS=bootsplash.sysconfig
diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash
index 0575cb2..22b1a03 100755
--- a/scripts/make-boot-splash
+++ b/scripts/make-boot-splash
@@ -6,7 +6,6 @@
# $Id$
: ${splash_dir=/usr/share/bootsplash}
-: ${splash_cfg=/etc/bootsplash}
[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash
[[ -z $THEME ]] && THEME=Mandriva
@@ -32,48 +31,10 @@ else
exit 1
fi
-if [[ -f $splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg ]];then
- config=$splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg
-fi
-
-if [[ -f $splash_dir/themes/$THEME/lilo/message ]];then
- cp -f $splash_dir/themes/$THEME/lilo/message /boot/message-graphic
-fi
+rm -f $splash_dir/themes/current
+ln -s $THEME $splash_dir/themes/current
-if [[ -f $splash_dir/themes/$THEME/grub/splash.xpm.gz && -d /boot/grub/ ]];then
- rm -f /boot/grub/splash.xpm.gz
- cp -f $splash_dir/themes/$THEME/grub/splash.xpm.gz /boot/grub/splash.xpm.gz
-fi
-
-if [[ -z $config ]];then
- echo "Can't find a config file for resolution $resolution";
- exit 1;
-fi
-
-# warly: we cannot use file command which is in /usr/bin/
-# initrd_type=`zcat /boot/initrd-2.6.14-2mdk.ramfs.img | file -`
-
-if `/bin/zcat $initrd_file 2> /dev/null | /bin/cpio -t &> /dev/null`; then
- tmp_dir=`mktemp -d`
- pushd $tmp_dir &> /dev/null
- /bin/zcat $initrd_file 2>/dev/null | /bin/cpio -id 2>/dev/null
- if [[ -x /sbin/splash ]]; then
- /sbin/splash -s -f $config > $tmp_dir/bootsplash
- else
- if [[ -f $tmp_dir/bootsplash ]]; then
- rm -f $tmp_dir/bootsplash
- fi
- fi
- /bin/find . -print | cpio --quiet -c -o 2> /dev/null | gzip -c > $initrd_file
- popd &> /dev/null
- rm -rf $tmp_dir
-else
- $splash_dir/scripts/remove-boot-splash $initrd_file
-
- if [[ -x /sbin/splash ]]; then
- /sbin/splash -s -f $config >> $initrd_file
- fi
-fi
+$splash_dir/scripts/add-boot-splash-raw $initrd_file $resolution $THEME || exit 1
if [ -z "$DURING_INSTALL" ]; then
$splash_dir/scripts/switch-themes -u
diff --git a/scripts/make-boot-splash-raw b/scripts/make-boot-splash-raw
new file mode 100755
index 0000000..e453b55
--- /dev/null
+++ b/scripts/make-boot-splash-raw
@@ -0,0 +1,49 @@
+#!/bin/sh
+# -*- Mode: shell-script -*-
+# Copyright (C) 2002 by Chmouel Boudjnah <chmouel@mandrakesoft.com>
+# Redistribution of this file is permitted under the terms of the GNU
+# Public License (GPL)
+# $Id$
+
+: ${splash_dir=/usr/share/bootsplash}
+: ${splash_cfg=/etc/bootsplash}
+
+[ $# = 3 ] || { echo "usage: $0 <initrd> <resolution> <theme>"; exit 1; }
+
+initrd_file=$1
+resolution=$2
+THEME=$3
+
+if [[ -f $splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg ]];then
+ config=$splash_cfg/themes/$THEME/config/bootsplash-$resolution.cfg
+fi
+
+if [[ -z $config ]];then
+ echo "Can't find a config file for resolution $resolution";
+ exit 1;
+fi
+
+# warly: we cannot use file command which is in /usr/bin/
+# initrd_type=`zcat /boot/initrd-2.6.14-2mdk.ramfs.img | file -`
+
+if `/bin/zcat $initrd_file 2> /dev/null | /bin/cpio -t &> /dev/null`; then
+ tmp_dir=`mktemp -d`
+ pushd $tmp_dir &> /dev/null
+ /bin/zcat $initrd_file 2>/dev/null | /bin/cpio -id 2>/dev/null
+ if [[ -x /sbin/splash ]]; then
+ /sbin/splash -s -f $config > $tmp_dir/bootsplash
+ else
+ if [[ -f $tmp_dir/bootsplash ]]; then
+ rm -f $tmp_dir/bootsplash
+ fi
+ fi
+ /bin/find . -print | cpio --quiet -c -o 2> /dev/null | gzip -c > $initrd_file
+ popd &> /dev/null
+ rm -rf $tmp_dir
+else
+ $splash_dir/scripts/remove-boot-splash $initrd_file
+
+ if [[ -x /sbin/splash ]]; then
+ /sbin/splash -s -f $config >> $initrd_file
+ fi
+fi