From 586f37afdf754d607dbba717749387f68d4b16d2 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhard Date: Sun, 8 Apr 2012 16:42:49 +0200 Subject: moved kdm patch to hook script to check kdm exists For builds with other login managers than kdm the build always fails because patching /etc/init.d/kdm abort with error. I wrapped the patch inside a hook script that ensures /etc/init.d/kdm exists before patching. --- .../chroot_local-hooks/patch-kdm-to-kill-plymouth.sh | 20 ++++++++++++++++++++ config/chroot_local-patches/kdm_plymouth_hack.patch | 13 ------------- 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100755 config/chroot_local-hooks/patch-kdm-to-kill-plymouth.sh delete mode 100644 config/chroot_local-patches/kdm_plymouth_hack.patch diff --git a/config/chroot_local-hooks/patch-kdm-to-kill-plymouth.sh b/config/chroot_local-hooks/patch-kdm-to-kill-plymouth.sh new file mode 100755 index 0000000..ce56832 --- /dev/null +++ b/config/chroot_local-hooks/patch-kdm-to-kill-plymouth.sh @@ -0,0 +1,20 @@ +#!/bin/sh +if [ -f /etc/init.d/kdm ]; then + patch --no-backup-if-mismatch -p0 <<'EOT' +--- /etc/init.d/kdm 2011-02-12 20:16:11.000000000 +0100 ++++ /etc/init.d/kdm 2011-09-28 04:05:22.977140278 +0200 +@@ -126,6 +126,10 @@ + [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then + log_action_msg "Not starting K Display Manager (kdm); it is not the default display manager." + else ++ log_action_msg "Killing plymouth..." ++ if pidof plymouthd >/dev/null; then ++ /bin/plymouth --quit --wait ++ fi + log_daemon_msg "Starting K Display Manager" "kdm" + if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG ; then + log_end_msg 0 +EOT +else + exit 0 +fi diff --git a/config/chroot_local-patches/kdm_plymouth_hack.patch b/config/chroot_local-patches/kdm_plymouth_hack.patch deleted file mode 100644 index 6539f3c..0000000 --- a/config/chroot_local-patches/kdm_plymouth_hack.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- /build/kanotix/chroot/etc/init.d/kdm 2011-02-12 20:16:11.000000000 +0100 -+++ /etc/init.d/kdm 2011-09-28 04:05:22.977140278 +0200 -@@ -126,6 +126,10 @@ - [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then - log_action_msg "Not starting K Display Manager (kdm); it is not the default display manager." - else -+ log_action_msg "Killing plymouth..." -+ if pidof plymouthd >/dev/null; then -+ /bin/plymouth --quit --wait -+ fi - log_daemon_msg "Starting K Display Manager" "kdm" - if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG ; then - log_end_msg 0 -- cgit v1.0