]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Gut plymouth-update-initrd
authorRay Strode <rstrode@redhat.com>
Fri, 17 Oct 2008 19:49:31 +0000 (15:49 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 17 Oct 2008 19:49:31 +0000 (15:49 -0400)
It's broken and people keep using it, so change it so that it's
useful.

.gitignore
scripts/Makefile.am
scripts/plymouth-update-initrd [new file with mode: 0755]
scripts/plymouth-update-initrd.in [deleted file]

index 301a45af9d7baf1e2515cb4b5bdb96bbfe84648d..16882ad216c611c250cdcea8969aad127437fb5a 100644 (file)
@@ -27,7 +27,6 @@ aclocal.m4
 stamp-*
 *.rpm
 plymouth
-plymouth-update-initrd
 plymouth-populate-initrd
 plymouthd
 *.pc
index 6536fa13eb63f5aae41ba34574a837450d85fc31..bcd04de4385a79fc3264bf6cf66e4c0f6e616f44 100644 (file)
@@ -6,9 +6,6 @@ initrdscript_SCRIPTS = plymouth-update-initrd plymouth-populate-initrd
 sbinscriptsdir = $(sbindir)
 sbinscripts_SCRIPTS = plymouth-set-default-plugin
 
-plymouth-update-initrd: $(srcdir)/plymouth-update-initrd.in
-       sed -e 's,[@]logofile[@],$(logofile),g' $(srcdir)/plymouth-update-initrd.in > plymouth-update-initrd
-
 plymouth-populate-initrd: $(srcdir)/plymouth-populate-initrd.in
        sed -e 's,[@]logofile[@],$(logofile),g'                                \
            -e 's,[@]plymouthclientdir[@],$(plymouthclientdir),g'              \
@@ -21,11 +18,11 @@ plymouth-set-default-plugin: $(srcdir)/plymouth-set-default-plugin.in
            -e 's,[@]plymouthdaemondir[@],$(plymouthdaemondir),g'              \
            $(srcdir)/plymouth-set-default-plugin.in > plymouth-set-default-plugin
 
-EXTRA_DIST= plymouth-update-initrd.in                                          \
+EXTRA_DIST= plymouth-update-initrd                                             \
            plymouth-populate-initrd.in                                        \
            plymouth-set-default-plugin.in                                     \
            $(noinst_SCRIPTS)                                                  \
            default.cfg
 
-CLEANFILES = plymouth-update-initrd plymouth-populate-initrd plymouth-set-default-plugin
-MAINTAINERCLEANFILES = Makefile.in plymouth-update-initrd plymouth-populate-initrd plymouth-set-default-plugin
+CLEANFILES = plymouth-populate-initrd plymouth-set-default-plugin
+MAINTAINERCLEANFILES = Makefile.in plymouth-populate-initrd plymouth-set-default-plugin
diff --git a/scripts/plymouth-update-initrd b/scripts/plymouth-update-initrd
new file mode 100755 (executable)
index 0000000..1403b8b
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
diff --git a/scripts/plymouth-update-initrd.in b/scripts/plymouth-update-initrd.in
deleted file mode 100755 (executable)
index b8bc8f8..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-
-[ -z "$DESTDIR" ] || exit 0
-
-set -e
-
-[ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec"
-[ -z "$DATADIR" ] && DATADIR="/usr/share"
-[ -z "$INITRD" ] && INITRD="/boot/initrd-$(/sbin/grubby --default-kernel | sed 's/.*vmlinuz-//g').img"
-[ -z "$SYSTEMMAP" ] && SYSTEM_MAP="/boot/System.map-$(/bin/uname -r)"
-[ -z "$LIB" ] && $(echo nash-showelfinterp /usr/bin/plymouth | /sbin/nash --forcequiet | grep -q lib64) && LIB="lib64" || LIB="lib"
-[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB"
-[ -z "$BINDIR" ] && BINDIR="/usr/bin"
-[ -z "$GRUB_MENU_TITLE" ] && GRUB_MENU_TITLE="Graphical Bootup"
-[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="@logofile@"
-
-if [ -z "$NEW_INITRD" ]; then
-  NEW_INITRD="$(dirname $INITRD)/$(basename $INITRD .img)-plymouth.img"
-fi
-
-function get_lib_deps()
-{
-
-    while [ $# -gt 0 ]; do
-        /usr/bin/ldd $1 | sed -n 's/.*=> \?\([^ ]*\) (.*$/\1/p'
-        shift
-    done | sort -u
-}
-
-TMPDIR="$(mktemp -d $PWD/initrd.XXXXXXXXXX)"
-
-(cd $TMPDIR
-    zcat $INITRD | cpio --quiet -Hnewc -i --make-directories
-    sed -i -e 's@mknod /dev/ttyS3 c 4 67@&\nmknod /dev/fb c 29 0\nmknod /dev/fb0 c 29 0\ndaemonize /bin/plymouthd\n/bin/plymouth --show-splash\n@' init
-    sed -i -e 's@switchroot@&\n/bin/plymouth --newroot /sysroot\n&\n@' init
-    (cd $LIBDIR
-        DEPS=$(get_lib_deps ${LIBEXECDIR}/plymouth/plymouthd ${BINDIR}/plymouth ${LIBDIR}/plymouth/spinfinity.so ${LIBDIR}/plymouth/text.so ${LIBDIR}/plymouth/details.so)
-        for dep in $DEPS; do
-            install -D -m755 $dep ${TMPDIR}$(dirname $dep)
-        done
-    )
-    /sbin/ldconfig -n $LIB
-    /sbin/ldconfig -n .${LIBDIR}
-
-    install -m755 ${LIBEXECDIR}/plymouth/plymouthd bin
-    install -m755 ${BINDIR}/plymouth bin
-
-    mkdir -p ${TMPDIR}${DATADIR}/plymouth/spinfinity
-    install -m644 ${DATADIR}/plymouth/spinfinity/lock.png ${TMPDIR}${DATADIR}/plymouth/spinfinity
-    install -m644 ${DATADIR}/plymouth/spinfinity/entry.png ${TMPDIR}${DATADIR}/plymouth/spinfinity
-    install -m644 ${DATADIR}/plymouth/spinfinity/bullet.png ${TMPDIR}${DATADIR}/plymouth/spinfinity
-    install -m644 ${DATADIR}/plymouth/spinfinity/box.png ${TMPDIR}${DATADIR}/plymouth/spinfinity
-    install -m644 ${DATADIR}/plymouth/spinfinity/throbber-[0-3][0-9].png ${TMPDIR}${DATADIR}/plymouth/spinfinity
-
-    mkdir -p ${TMPDIR}${LIBDIR}/plymouth
-    install -m755 ${LIBDIR}/plymouth/spinfinity.so ${TMPDIR}${LIBDIR}/plymouth
-    install -m755 ${LIBDIR}/plymouth/text.so ${TMPDIR}${LIBDIR}/plymouth
-    install -m755 ${LIBDIR}/plymouth/details.so ${TMPDIR}${LIBDIR}/plymouth
-
-    install -D -m644 ${PLYMOUTH_LOGO_FILE} ${TMPDIR}${PLYMOUTH_LOGO_FILE}
-
-    rm -f $NEW_INITRD
-    find | cpio --quiet -Hnewc -o | gzip -9 > $NEW_INITRD
-    [ $? -eq 0 ] && echo "Wrote $NEW_INITRD"
-)
-
-rm -rf "$TMPDIR"
-
-# XXX: Hack to clean out old entry since grubby doesn't deal with dupes too well
-if fgrep -q "title $GRUB_MENU_TITLE" /etc/grub.conf; then
-    TMPFILE="$(mktemp /etc/grub.conf.XXXXXXXXXX)"
-    if [ -L /etc/grub.conf ]; then
-        GRUB_CONF="$(readlink /etc/grub.conf)"
-   else
-        GRUB_CONF="/etc/grub.conf"
-    fi
-    (cd /etc; awk '$1 != "'"$GRUB_MENU_TITLE"'" { printf $0 RT }' RS="title " FS="\n" $GRUB_CONF > $TMPFILE \
-    && mv $TMPFILE $GRUB_CONF || rm -f $TMPFILE)
-fi
-
-CURRENT_KERNEL=$(/sbin/grubby --default-kernel)
-
-/sbin/grubby --title="$GRUB_MENU_TITLE"       \
-             --add-kernel="$CURRENT_KERNEL"   \
-            --copy-default                   \
-            --args="vga=0x318 rhgb quiet"    \
-            --initrd="$NEW_INITRD"