diff options
author | Ray Strode <rstrode@redhat.com> | 2007-06-08 13:16:38 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2007-06-08 13:16:38 -0400 |
commit | c8028cb9989b0d7b0c34abdcd1c2666ece7bd2e5 (patch) | |
tree | 133ff91ca92602af8a0e903e855249d0c4f34801 /scripts | |
parent | 9c251462b6cd8ca8c72f544001b32112a36bf845 (diff) | |
download | plymouth-c8028cb9989b0d7b0c34abdcd1c2666ece7bd2e5.tar.gz plymouth-c8028cb9989b0d7b0c34abdcd1c2666ece7bd2e5.tar.xz plymouth-c8028cb9989b0d7b0c34abdcd1c2666ece7bd2e5.zip |
update initrd script to install plymouth from local system
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/plymouth-update-initrd.sh | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/scripts/plymouth-update-initrd.sh b/scripts/plymouth-update-initrd.sh index 276ed02..b9de639 100755 --- a/scripts/plymouth-update-initrd.sh +++ b/scripts/plymouth-update-initrd.sh @@ -1,19 +1,43 @@ #!/bin/bash +set -e + +[ -z "$LIB" ] && LIB="lib" +[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB" +[ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec" +[ -z "$DATADIR" ] && DATADIR="/usr/share" [ -z "$INITRD" ] && INITRD="/boot/initrd-$(/bin/uname -r).img" if [ -z "$NEW_INITRD" ]; then - NEW_INITRD="$(/bin/dirname $INITRD)/$(/bin/basename $INITRD .img)-plymouth.img" + NEW_INITRD="$(dirname $INITRD)/$(basename $INITRD .img)-plymouth.img" fi TMPDIR="$(mktemp -d $PWD/initrd.XXXXXXXXXX)" ( cd $TMPDIR - zcat $INITRD | cpio -q -Hnewc -i --make-directories + zcat $INITRD | cpio --quiet -Hnewc -i --make-directories sed -i -e 's@^#!\(.*\)@#!/bin/plymouth \1@' init + ( + cd $LIBDIR + install -m755 $(/usr/bin/readlink libply.so) $TMPDIR/lib + install -m755 $(/usr/bin/readlink libpng12.so) $TMPDIR/lib + cd /$LIB + ) + /sbin/ldconfig -n lib + + install -m755 $LIBEXECDIR/plymouth/plymouth bin + + mkdir -p usr/share/plymouth + + install -m644 $DATADIR/pixmaps/fedora-logo.png usr/share/plymouth + install -m644 $DATADIR/plymouth/star.png usr/share/plymouth + + mkdir -p usr/$LIB/plymouth + install -m755 $LIBDIR/plymouth/fedora-fade-in.so usr/$LIB/plymouth + rm -f $NEW_INITRD - find | cpio -q -Hnewc -o | gzip -9 > $NEW_INITRD + find | cpio --quiet -Hnewc -o | gzip -9 > $NEW_INITRD [ $? -eq 0 ] && echo "Wrote $NEW_INITRD" ) |