From 2594d497fa680116803c215ef4119369423b58f2cbb2aab892fe3387bdea93d6 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Thu, 21 Jun 2012 14:20:37 +0000 Subject: [PATCH] Accepting request 125621 from home:lnussel:branches:Base:System - disable plymouth if init is not systemd (could be e.g. /bin/sh or sysvinit then) OBS-URL: https://build.opensuse.org/request/show/125621 OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=54 --- plymouth.changes | 6 ++++++ plymouth.spec | 5 +++++ suse-initrd-support | 48 ++++++++++++++++++++++++++++++++++----------- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/plymouth.changes b/plymouth.changes index 6fbcaf4..67ed3e2 100644 --- a/plymouth.changes +++ b/plymouth.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 21 09:48:11 UTC 2012 - lnussel@suse.de + +- disable plymouth if init is not systemd (could be e.g. /bin/sh or + sysvinit then) + ------------------------------------------------------------------- Mon Jun 11 10:19:49 UTC 2012 - coolo@suse.com diff --git a/plymouth.spec b/plymouth.spec index d7db7ed..979045f 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -397,18 +397,23 @@ if [ $1 -eq 0 ]; then fi %post scripts -p /sbin/mkinitrd_setup + %postun scripts -p /sbin/mkinitrd_setup %post -n libply-boot-client2 -p /sbin/ldconfig + %postun -n libply-boot-client2 -p /sbin/ldconfig %post -n libply-splash-core2 -p /sbin/ldconfig + %postun -n libply-splash-core2 -p /sbin/ldconfig %post -n libply-splash-graphics2 -p /sbin/ldconfig + %postun -n libply-splash-graphics2 -p /sbin/ldconfig %post -n libply2 -p /sbin/ldconfig + %postun -n libply2 -p /sbin/ldconfig %post theme-spinfinity diff --git a/suse-initrd-support b/suse-initrd-support index 8ab18ba..3d946d5 100644 --- a/suse-initrd-support +++ b/suse-initrd-support @@ -1,6 +1,8 @@ ---- plymouth-0.8.4/configure.ac 2012-02-06 22:01:36.000000000 +0100 -+++ new/configure.ac 2012-04-03 10:28:00.658536991 +0200 -@@ -440,6 +440,7 @@ +Index: plymouth-0.8.4/configure.ac +=================================================================== +--- plymouth-0.8.4.orig/configure.ac ++++ plymouth-0.8.4/configure.ac +@@ -440,6 +440,7 @@ AC_CONFIG_FILES([Makefile themes/spinner/Makefile themes/script/Makefile images/Makefile @@ -8,18 +10,38 @@ scripts/plymouth-generate-initrd scripts/plymouth-populate-initrd scripts/plymouth-set-default-theme +Index: plymouth-0.8.4/scripts/boot-plymouth.chroot.sh +=================================================================== --- /dev/null -+++ new/scripts/boot-plymouth.chroot.sh 2012-04-03 10:28:00.659536992 +0200 -@@ -0,0 +1,7 @@ ++++ plymouth-0.8.4/scripts/boot-plymouth.chroot.sh +@@ -0,0 +1,23 @@ +#!/bin/bash +#%stage: setup +#%depends: plymouth -+#%programs: /usr/bin/plymouth /usr/sbin/plymouthd ++#%programs: /usr/bin/plymouth /usr/sbin/plymouthd /usr/bin/readlink +#%dontshow + -+plymouth update-root-fs --new-root-dir=/root ++ply_init_is_systemd() ++{ ++ local d="$init" ++ [ -n "$d" ] || return 1 ++ if [ -L "/root$d" ]; then ++ d=`readlink "/root$d"` ++ fi ++ [ "${d##*/}" = systemd ] || return 1 ++ return 0 ++} ++ ++if ply_init_is_systemd; then ++ plymouth update-root-fs --new-root-dir=/root ++else ++ echo "init $init is not systemd, terminate plymouth" ++ plymouth quit ++fi +Index: plymouth-0.8.4/scripts/boot-plymouth.sh +=================================================================== --- /dev/null -+++ new/scripts/boot-plymouth.sh 2012-04-03 10:28:00.659536992 +0200 ++++ plymouth-0.8.4/scripts/boot-plymouth.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#%stage: boot @@ -31,8 +53,10 @@ +/usr/sbin/plymouthd --attach-to-session --pid-file /run/plymouth/pid + +plymouth show-splash +Index: plymouth-0.8.4/scripts/setup-plymouth.sh.in +=================================================================== --- /dev/null -+++ new/scripts/setup-plymouth.sh.in 2012-04-03 11:11:44.656337240 +0200 ++++ plymouth-0.8.4/scripts/setup-plymouth.sh.in @@ -0,0 +1,61 @@ +#!/bin/bash +# @@ -95,8 +119,10 @@ +install -D ${_pangomod} $tmp_mnt/${_pangomod} +install -D ${pangobasicfc} $tmp_mnt/${pangobasicfc} +mkdir -p $tmp_mnt/var/cache/fontconfig ---- plymouth-0.8.4/scripts/plymouth-update-initrd 2008-12-19 05:36:55.000000000 +0100 -+++ new/scripts/plymouth-update-initrd 2012-05-15 10:59:08.158501726 +0200 +Index: plymouth-0.8.4/scripts/plymouth-update-initrd +=================================================================== +--- plymouth-0.8.4.orig/scripts/plymouth-update-initrd ++++ plymouth-0.8.4/scripts/plymouth-update-initrd @@ -1,2 +1,2 @@ #!/bin/bash -mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)