From 5803de5d703ab598976daadb5640200b29bc7646e4e6abd13e9405c82b045d67 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sun, 2 Oct 2011 09:16:05 +0000 Subject: [PATCH] Accepting request 85490 from Base:System - Add services to stop bootsplash at end of startup and start it at beginning of shutdown. - Fix bootsplash call and ensure dependencies are set right. - Add services to stop bootsplash at end of startup and start it at beginning of shutdown. - Fix bootsplash call and ensure dependencies are set right. (forwarded request 85489 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/85490 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=72 --- bootsplash-quit.service | 10 ++++++++++ bootsplash-shutdown.service | 10 ++++++++++ bootsplash-startup.service | 2 +- detect-non-running.patch | 30 ++++++++++++++++++++++++++++++ macros.systemd | 8 ++++---- systemd-bootsplash | 9 ++++++++- systemd-gtk.changes | 15 +++++++++++++++ systemd.changes | 15 +++++++++++++++ systemd.spec | 11 ++++++++++- 9 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 bootsplash-quit.service create mode 100644 bootsplash-shutdown.service create mode 100644 detect-non-running.patch diff --git a/bootsplash-quit.service b/bootsplash-quit.service new file mode 100644 index 0000000..b290845 --- /dev/null +++ b/bootsplash-quit.service @@ -0,0 +1,10 @@ +[Unit] +Description=Terminate bootsplash +After=xdm.service rc-local.service bootsplash-startup.service +DefaultDependencies=no +Names=plymout-quit-wait.service + +[Service] +ExecStart=/lib/systemd/systemd-bootsplash 5 +Type=oneshot +RemainAfterExit=true diff --git a/bootsplash-shutdown.service b/bootsplash-shutdown.service new file mode 100644 index 0000000..76d4344 --- /dev/null +++ b/bootsplash-shutdown.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start bootsplash for shutdown/reboot +Before=shutdown.service halt.service +DefaultDependencies=no +ConditionKernelCommandLine=splash=silent + +[Service] +ExecStart=/lib/systemd/systemd-bootsplash 0 +Type=oneshot +RemainAfterExit=true diff --git a/bootsplash-startup.service b/bootsplash-startup.service index 8ed061f..a10976c 100644 --- a/bootsplash-startup.service +++ b/bootsplash-startup.service @@ -4,6 +4,6 @@ DefaultDependencies=no ConditionKernelCommandLine=splash=silent [Service] -ExecStart=/lib/system/systemd-bootsplash B +ExecStart=/lib/systemd/systemd-bootsplash 0 Type=oneshot RemainAfterExit=true diff --git a/detect-non-running.patch b/detect-non-running.patch new file mode 100644 index 0000000..eedcac3 --- /dev/null +++ b/detect-non-running.patch @@ -0,0 +1,30 @@ +From 8185a5090a34531b9ef0a65ed3e948e7b6839754 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 29 Sep 2011 15:31:53 +0200 +Subject: [PATCH] systemctl: fix detection whether the dbus connection is available + +--- + src/systemctl.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/src/systemctl.c b/src/systemctl.c +index 848d6a8..7af0f73 100644 +--- a/src/systemctl.c ++++ b/src/systemctl.c +@@ -4989,6 +4989,13 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError + return 0; + } + ++ if (!bus) { ++ log_error("Failed to get D-Bus connection: %s", error->message); ++ return -EIO; ++ } ++ ++ } else { ++ + if (!bus && !avoid_bus()) { + log_error("Failed to get D-Bus connection: %s", error->message); + return -EIO; +-- +1.7.3.4 + diff --git a/macros.systemd b/macros.systemd index 8995a9a..87621ab 100644 --- a/macros.systemd +++ b/macros.systemd @@ -34,12 +34,12 @@ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ # disable migration if initial install under systemd \ if [ $FIRST_ARG -eq 1 ]; then \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ touch "/var/lib/systemd/migrated/$sysv_service" \ done \ else \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \ services_to_migrate="$services_to_migrate $sysv_service" \ fi \ @@ -54,7 +54,7 @@ fi \ %service_add_post() \ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \ services_to_migrate="$services_to_migrate $sysv_service" \ touch "/var/lib/systemd/migrated/$sysv_service" \ @@ -85,7 +85,7 @@ if [ $FIRST_ARG -ge 1 ]; then \ /bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \ else # package uninstall \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null \ done \ /bin/systemctl daemon-reload >/dev/null 2>&1 || : \ diff --git a/systemd-bootsplash b/systemd-bootsplash index 653cbe7..1f5839a 100644 --- a/systemd-bootsplash +++ b/systemd-bootsplash @@ -1,3 +1,10 @@ #! /bin/bash . /etc/rc.splash $1 -splashtrigger "rlchange $1" +export RUNLEVEL=$1 +export PREVLEVEL=N +if [ "$1" == "5" ]; then + splashtrigger "rlreached $1" +else + splashtrigger "rlchange $1" + splashtrigger "coolo" +fi diff --git a/systemd-gtk.changes b/systemd-gtk.changes index 7f8c225..81c8742 100644 --- a/systemd-gtk.changes +++ b/systemd-gtk.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Sep 29 16:08:33 UTC 2011 - fcrozat@suse.com + +- Add services to stop bootsplash at end of startup and start it at + beginning of shutdown. +- Fix bootsplash call and ensure dependencies are set right. + +------------------------------------------------------------------- +Thu Sep 29 13:43:00 UTC 2011 - fcrozat@suse.com + +- Add detect-non-running.patch: fix assertion when running + systemctl under non systemd system (git). +- Requires presets branding package. +- Improve macros a little bit. + ------------------------------------------------------------------- Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com diff --git a/systemd.changes b/systemd.changes index 7f8c225..81c8742 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Sep 29 16:08:33 UTC 2011 - fcrozat@suse.com + +- Add services to stop bootsplash at end of startup and start it at + beginning of shutdown. +- Fix bootsplash call and ensure dependencies are set right. + +------------------------------------------------------------------- +Thu Sep 29 13:43:00 UTC 2011 - fcrozat@suse.com + +- Add detect-non-running.patch: fix assertion when running + systemctl under non systemd system (git). +- Requires presets branding package. +- Improve macros a little bit. + ------------------------------------------------------------------- Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 3b98d1f..f9f02fc 100644 --- a/systemd.spec +++ b/systemd.spec @@ -44,6 +44,7 @@ Requires: dbus-1 >= 1.4.0 Requires: kbd Requires: util-linux >= 2.19 Requires: pam-config +Requires: systemd-presets-branding Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 @@ -55,6 +56,8 @@ Source5: systemd-insserv_conf Source6: baselibs.conf Source7: systemd-bootsplash Source8: bootsplash-startup.service +Source9: bootsplash-quit.service +Source10: bootsplash-shutdown.service Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch # handle SUSE specific kbd settings Patch6: 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch @@ -69,6 +72,7 @@ Patch10: revert_insserv_conf_parsing.patch Patch9: 0001-execute-fix-bus-serialization-for-commands.patch # PATCH-FIX-UPSTREAM fix-reload.patch fcrozat@suse.com bnc#719221 -- Fix daemon-reload and conditions when service is starting Patch11: fix-reload.patch +Patch12: detect-non-running.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -124,6 +128,7 @@ Plymouth integration for systemd %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build autoreconf -fiv @@ -148,7 +153,11 @@ mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrate install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert install -m755 %{S:5} %{buildroot}/lib/systemd/system-generators install -m755 %{S:7} %{buildroot}/lib/systemd/ -install -m644 %{S:8} %{buildroot}/lib/systemd/system/ +install -m644 %{S:8} %{S:9} %{S:10} %{buildroot}/lib/systemd/system/ +ln -s ../bootsplash-startup.service %{buildroot}/lib/systemd/system/basic.target.wants/ +ln -s ../bootsplash-quit.service %{buildroot}/lib/systemd/system/multi-user.target.wants/ +ln -s ../bootsplash-shutdown.service %{buildroot}/lib/systemd/system/shutdown.target.wants/ +ln -s ../bootsplash-shutdown.service %{buildroot}/lib/systemd/system/reboot.target.wants/ ln -s ../bin/systemd %{buildroot}/sbin/init ln -s ../bin/systemctl %{buildroot}/sbin/reboot ln -s ../bin/systemctl %{buildroot}/sbin/halt