diff options
author | Florent Villard <warly@mandriva.com> | 2006-04-10 15:54:05 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-04-10 15:54:05 +0000 |
commit | 644d2f982aeb403fea58f851fadf0c26508aa67d (patch) | |
tree | 70c53ed8b23287ed1a4b4877dca0fca64cddef0a /scripts/make-boot-splash | |
parent | 1697e7a5fce440e9785055360673f11413fda59b (diff) | |
download | bootsplash-644d2f982aeb403fea58f851fadf0c26508aa67d.tar bootsplash-644d2f982aeb403fea58f851fadf0c26508aa67d.tar.gz bootsplash-644d2f982aeb403fea58f851fadf0c26508aa67d.tar.bz2 bootsplash-644d2f982aeb403fea58f851fadf0c26508aa67d.tar.xz bootsplash-644d2f982aeb403fea58f851fadf0c26508aa67d.zip |
handle initramfs initrd in make-boot-splash and remove-boot-splash
Diffstat (limited to 'scripts/make-boot-splash')
-rwxr-xr-x | scripts/make-boot-splash | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash index 177005c..9bf64a0 100755 --- a/scripts/make-boot-splash +++ b/scripts/make-boot-splash @@ -45,12 +45,31 @@ if [[ -z $config ]];then exit 1; fi -$splash_dir/scripts/remove-boot-splash $initrd_file +# warly: we cannot use file command which is in /usr/bin/ +# initrd_type=`zcat /boot/initrd-2.6.14-2mdk.ramfs.img | file -` -if [[ -x /sbin/splash ]]; then - /sbin/splash -s -f $config >> $initrd_file -fi +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 | /bin/cpio -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 + if [ -z "$DURING_INSTALL" ]; then $splash_dir/scripts/switch-themes -u fi |