Package: plymouth
Version: 0.8.1-1~1.gbpf67c63
Severity: wishlist
Tags: patch
And replace add a custom script to update the initramfs instead. This
makes e.g.
plymouth-set-default-theme text --rebuild-initrd
work as expected.
-- Guido
>From 5bb40cef6a24a681655d7bf492707f1da59e9b68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Sun, 28 Mar 2010 17:58:55 +0200
Subject: [PATCH] Install custom plymouth-update-initrd
so we can drop plymouth-set-default-plugin
---
debian/local/plymouth-set-default-plugin.sh | 160 ---------------------------
debian/local/plymouth-update-initrd | 5 +
debian/rules | 2 +-
3 files changed, 6 insertions(+), 161 deletions(-)
delete mode 100644 debian/local/plymouth-set-default-plugin.sh
create mode 100644 debian/local/plymouth-update-initrd
diff --git a/debian/local/plymouth-set-default-plugin.sh b/debian/local/plymouth-set-default-plugin.sh
deleted file mode 100644
index ae503d8..0000000
--- a/debian/local/plymouth-set-default-plugin.sh
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/sh
-
-set -e
-
-Usage ()
-{
- echo "Usage: plymouth-set-default-plugin { --list | --reset | <plugin-name> [ --rebuild-initrd ] }"
-}
-
-List_plugins ()
-{
- for PLUGIN in /usr/lib/plymouth/*.so
- do
- [ -f "${PLUGIN}" ] || continue
- [ -L "${PLUGIN}" ] && continue
-
- if nm -D "${PLUGIN}" | grep -q ply_boot_splash_plugin_get_interface
- then
- echo "$(basename ${PLUGIN} .so)"
- fi
- done
-}
-
-Get_default_plugin ()
-{
- PLUGIN_NAME="$(basename $(readlink /usr/lib/plymouth/default.so) .so)"
-
- if [ "${PLUGIN_NAME}" = ".so" ]
- then
- ${0} --reset
-
- PLUGIN_NAME="$(basename $(readlink /usr/lib/plymouth/default.so) .so)"
- fi
-
- [ "${PLUGIN_NAME}" = ".so" ] || echo "${PLUGIN_NAME}" && exit 1
-}
-
-DO_RESET="0"
-DO_INITRD_REBUILD="0"
-DO_LIST="0"
-PLUGIN_NAME=""
-
-while [ ${#} -gt 0 ]
-do
- case "${1}" in
- --list)
- if [ -n "${PLUGIN_NAME}" ]
- then
- echo "You can only specify --list or a plugin name, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- if [ ${DO_RESET} -ne 0 ]
- then
- echo "You can only specify --reset or --list, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- DO_LIST="1"
- ;;
-
- --rebuild-initrd)
- DO_INITRD_REBUILD="1"
- ;;
-
- --reset|default)
- if [ -n "${PLUGIN_NAME}" ]
- then
- echo "You can only specify --reset or a plugin name, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- if [ ${DO_LIST} -ne 0 ]
- then
- echo "You can only specify --reset or --list, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- DO_RESET="1"
- ;;
-
- *)
- if [ -n "${PLUGIN_NAME}" ]
- then
- echo "You can only specify one plugin at a time" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- if [ ${DO_RESET} -ne 0 ]
- then
- echo "You can only specify --reset or a plugin name, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- if [ ${DO_LIST} -ne 0 ]
- then
- echo "You can only specify --list or a plugin name, not both" > /dev/stderr
- echo "$(Usage)" > /dev/stderr
-
- exit 1
- fi
-
- PLUGIN_NAME="${1}"
- ;;
- esac
-
- shift
-done
-
-if [ ${DO_LIST} -ne 0 ]
-then
- List_plugins
- exit ${?}
-fi
-
-if [ ${DO_RESET} -eq 0 ] && [ ${DO_INITRD_REBUILD} -eq 0 ] && [ -z ${PLUGIN_NAME} ]
-then
- Get_default_plugin
- exit ${?}
-fi
-
-if [ $(id -u) -ne 0 ]
-then
- echo "This program must be run as root" > /dev/stderr
- exit 1
-fi
-
-if [ ${DO_RESET} -ne 0 ]
-then
- PLUGIN_NAME="$(basename $(ls -1 -t /usr/lib/plymouth/*.so 2> /dev/null | grep -v default.so | tail -n 1) .so)"
-
- if [ "${PLUGIN_NAME}" = ".so" ]
- then
- rm -f /usr/lib/plymouth/default.so
- exit 0
- fi
-fi
-
-if [ ! -e /usr/lib/plymouth/${PLUGIN_NAME}.so ]
-then
- echo "/usr/lib/plymouth/${PLUGIN_NAME}.so does not exist" > /dev/stderr
- exit 1
-fi
-
-( cd /usr/lib/plymouth;
- ln -sf ${PLUGIN_NAME}.so default.so && \
- [ ${DO_INITRD_REBUILD} -ne 0 ] && \
- update-initramfs -u )
diff --git a/debian/local/plymouth-update-initrd b/debian/local/plymouth-update-initrd
new file mode 100644
index 0000000..acb2f3f
--- /dev/null
+++ b/debian/local/plymouth-update-initrd
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+update-initramfs -u
+
diff --git a/debian/rules b/debian/rules
index b4fa54f..e0d68b6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,7 +36,7 @@ override_dh_install:
# Adding other debian specific files
uudecode debian/local/debian-logo.png.uue -o debian/plymouth/usr/share/plymouth/debian-logo.png
- install -D -m 0755 debian/local/plymouth-set-default-plugin.sh debian/plymouth/usr/sbin/plymouth-set-default-plugin
+ install -D -m 0755 debian/local/plymouth-update-initrd debian/plymouth/usr/lib/plymouth/plymouth/plymouth-update-initrd
override_dh_makeshlibs:
dh_makeshlibs -p plymouth
--
1.7.0.3