From c664d4dfe0f952d63ace63ff52a3ef6932519ece Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Oct 12 2011 14:05:07 +0000 Subject: Move back to sysv. --- diff --git a/atop.spec b/atop.spec index d1cc5b7..4c85c1d 100644 --- a/atop.spec +++ b/atop.spec @@ -1,6 +1,6 @@ Name: atop Version: 1.26 -Release: 1%{?dist} +Release: 1%{?dist}.1 Summary: An advanced interactive monitor to view the load on system and process level Group: Applications/System @@ -8,22 +8,26 @@ License: GPLv2+ URL: http://www.atcomputing.nl/Tools/atop/ Source0: http://www.atcomputing.nl/Tools/%{name}/packages/%{name}-%{version}.tar.gz Source1: atop.logrotate -#Source2: atop.init +Source2: atop.init Source3: atop.crondaily Source4: atop.sysconfig Source5: atop.d -Source6: atop.service +#Source6: atop.service Patch0: atop-1.23-cron.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: ncurses-devel -BuildRequires: systemd-units +#BuildRequires: systemd-units -Requires(post): systemd-units -Requires(post): systemd-sysv -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service + +#Requires(post): systemd-units +#Requires(post): systemd-sysv +#Requires(preun): systemd-units +#Requires(postun): systemd-units %description @@ -58,45 +62,49 @@ install -Dp -m 0644 man/atop.1 $RPM_BUILD_ROOT%{_mandir}/man1/atop.1 install -Dp -m 0644 man/atopsar.1 $RPM_BUILD_ROOT%{_mandir}/man1/atopsar.1 install -Dp -m 0644 atop.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/atop install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/atop -#install -Dp -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/atop +install -Dp -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/atop install -Dp -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/atop install -Dp -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/atop install -Dp -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/atopd -install -Dp -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/atop.service +#install -Dp -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/atop.service install -d $RPM_BUILD_ROOT%{_localstatedir}/log/atop %clean rm -rf $RPM_BUILD_ROOT %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +/sbin/chkconfig --add atop +#if [ $1 -eq 1 ] ; then +# # Initial installation +# /bin/systemctl daemon-reload >/dev/null 2>&1 || : +#fi %preun if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable atop.service > /dev/null 2>&1 || : - /bin/systemctl stop atop.service > /dev/null 2>&1 || : + /sbin/service atop stop &>/dev/null || : + /sbin/chkconfig --del atop +# # Package removal, not upgrade +# /bin/systemctl --no-reload disable atop.service > /dev/null 2>&1 || : +# /bin/systemctl stop atop.service > /dev/null 2>&1 || : fi %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +#/bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart atop.service >/dev/null 2>&1 || : + /sbin/service atop condrestart &>/dev/null || : +# # Package upgrade, not uninstall +# /bin/systemctl try-restart atop.service >/dev/null 2>&1 || : fi -%triggerun -- atop < 1.26-1 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply atop -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save atop >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del atop >/dev/null 2>&1 || : -/bin/systemctl try-restart atop.service >/dev/null 2>&1 || : +#%triggerun -- atop < 1.26-1 +## Save the current service runlevel info +## User must manually run systemd-sysv-convert --apply atop +## to migrate them to systemd targets +#/usr/bin/systemd-sysv-convert --save atop >/dev/null 2>&1 ||: +# +## Run these because the SysV package being removed won't do them +#/sbin/chkconfig --del atop >/dev/null 2>&1 || : +#/bin/systemctl try-restart atop.service >/dev/null 2>&1 || : %files @@ -106,16 +114,19 @@ fi %config(noreplace) %{_sysconfdir}/logrotate.d/atop %config(noreplace) %{_sysconfdir}/sysconfig/atop %{_sysconfdir}/cron.daily/atop -#%{_initrddir}/atop +%{_initrddir}/atop %{_bindir}/atopsar %{_bindir}/atop %{_bindir}/atopd %{_mandir}/man1/atop.1.gz %{_mandir}/man1/atopsar.1.gz %attr(0755,root,root) %dir %{_localstatedir}/log/atop -%{_unitdir}/atop.service +#%{_unitdir}/atop.service %changelog +* Wed Oct 12 2011 Jon Ciesla - 1.26-1.1 +- Moved back to SysV for f14, EL<=5. + * Tue Jun 21 2011 Jon Ciesla - 1.26-1 - New upstream, BZ 657207. - Migrated from sysv to systemd, BZ 659629.