diff --git a/ppc64-diag.spec b/ppc64-diag.spec index 08ec297..1393034 100644 --- a/ppc64-diag.spec +++ b/ppc64-diag.spec @@ -1,6 +1,6 @@ Name: ppc64-diag Version: 2.4.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux for Power Platform Diagnostics URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ Group: System Environment/Base @@ -11,7 +11,7 @@ BuildRequires: libvpd-devel, systemd-units Requires: servicelog, lsvpd Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/%{version}/%{name}-%{version}.tar.gz -Source1: ppc64-diag.service +Source1: rtas_errd.service Patch0: ppc64-diag-2.4.2-messagecatalog-location.patch Patch1: ppc64-diag-2.4.2-chkconfig.patch Patch2: ppc64-diag-2.4.3-scriptlocation.patch @@ -72,30 +72,38 @@ rm -rf $RPM_BUILD_ROOT %attr(644,root,root) %{_datadir}/%{name}/message_catalog/with_regex/* %attr(755,root,root) %{_sysconfdir}/rc.powerfail %attr(755,root,root) %{_libexecdir}/%{name}/rtas_errd -%attr(644,root,root) %{_unitdir}/ppc64-diag.service +%attr(644,root,root) %{_unitdir}/rtas_errd.service %post # Post-install script -------------------------------------------------- %{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null -if [ "$1" = "2" ]; then # upgrade - %{_libexecdir}/%{name}/rtas_errd restart +if [ "$1" = "1" ]; then # first install + systemctl -q enable rtas_errd.service + systemctl start rtas_errd.service +elif [ "$1" = "2" ]; then # upgrade + systemctl restart rtas_errd.service fi %preun # Pre-uninstall script ------------------------------------------------- if [ "$1" = "0" ]; then # last uninstall - %{_libexecdir}/%{name}/rtas_errd stop + systemctl stop rtas_errd.service + systemctl -q disable rtas_errd.service %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null fi %triggerin -- librtas # trigger on librtas upgrades ------------------------------------------ if [ "$2" = "2" ]; then - %{_libexecdir}/%{name}/rtas_errd restart + systemctl restart rtas_errd.service fi %changelog +* Fri Jul 27 2012 Lukáš Nykrýn - 2.4.3-3 +- rename .service file +- auto start rtas_errd (#843471) + * Sat Jul 21 2012 Fedora Release Engineering - 2.4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/ppc64-diag.service b/rtas_errd.service similarity index 65% rename from ppc64-diag.service rename to rtas_errd.service index 6b0c135..a08b0a3 100644 --- a/ppc64-diag.service +++ b/rtas_errd.service @@ -5,8 +5,8 @@ After=syslog.target [Service] Type=forking -ExecStart=/usr/libexec/ppc64-diag/rtas_errd.init start -ExecStop=/usr/libexec/ppc64-diag/rtas_errd.init stop +ExecStart=/usr/libexec/ppc64-diag/rtas_errd start +ExecStop=/usr/libexec/ppc64-diag/rtas_errd stop StandardOutput=syslog StandardError=syslog