diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-03-01 11:18:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-03-01 11:18:17 +0000 |
commit | 43cbd821058f2cef0cb1485e87c894c906a54a71 (patch) | |
tree | e6d89eb180efdd9ec76462c987134b7b54b06417 | |
parent | 9ce77d96e0f2a1b7c9e1e3cdac68377b7dccc3db (diff) | |
download | bootsplash-43cbd821058f2cef0cb1485e87c894c906a54a71.tar bootsplash-43cbd821058f2cef0cb1485e87c894c906a54a71.tar.gz bootsplash-43cbd821058f2cef0cb1485e87c894c906a54a71.tar.bz2 bootsplash-43cbd821058f2cef0cb1485e87c894c906a54a71.tar.xz bootsplash-43cbd821058f2cef0cb1485e87c894c906a54a71.zip |
use cpio-filter to remove bootsplash from initrd without being root
(removing a file using cpio implies "cpio -i" then "cpio -o", but devices can't be created as non-root)
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | scripts/make-boot-splash-raw | 11 |
2 files changed, 4 insertions, 9 deletions
@@ -1,5 +1,5 @@ NAME=bootsplash -VERSION := 3.2.4 +VERSION := 3.2.5 SUBDIRS=scripts fb fbmngplay fbtruetype splash po FILES=$(SUBDIRS) Makefile ChangeLog README diff --git a/scripts/make-boot-splash-raw b/scripts/make-boot-splash-raw index e453b55..f5279fe 100755 --- a/scripts/make-boot-splash-raw +++ b/scripts/make-boot-splash-raw @@ -28,17 +28,12 @@ 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 + /bin/zcat $initrd_file | cpio-filter --exclude bootsplash > $tmp_dir/initrd 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 + echo bootsplash | (cd $tmp_dir ; cpio -o -c -O $tmp_dir/initrd --append) fi - /bin/find . -print | cpio --quiet -c -o 2> /dev/null | gzip -c > $initrd_file - popd &> /dev/null + gzip -c $tmp_dir/initrd > $initrd_file rm -rf $tmp_dir else $splash_dir/scripts/remove-boot-splash $initrd_file |