[packages/SysVinit] - moved wtmpx -> wtmp migration to pretrans
baggins
baggins at pld-linux.org
Mon Nov 11 13:08:49 CET 2013
commit 16c205933ca286b6759e53b67b969902b80417bd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Nov 11 13:08:12 2013 +0100
- moved wtmpx -> wtmp migration to pretrans
It's not in trigger because wtmpx is %%ghost, and %%ghost-ed files
are removed when they'are uninstalled.
SysVinit.spec | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/SysVinit.spec b/SysVinit.spec
index 6925a69..09628b1 100644
--- a/SysVinit.spec
+++ b/SysVinit.spec
@@ -13,7 +13,7 @@ Summary(tr.UTF-8): System V başlatma programı
Summary(uk.UTF-8): Програми, що керують базовими системними процесами
Name: SysVinit
Version: 2.88
-Release: 16
+Release: 17
License: GPL v2+
Group: Base
Source0: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-%{version}dsf.tar.bz2
@@ -195,6 +195,18 @@ cp %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man5
%clean
rm -rf $RPM_BUILD_ROOT
+# not in trigger because wtmpx is %%ghost, and %%ghost-ed files
+# are removed when they'are uninstalled
+%pretrans
+if [ -e /var/log/wtmpx ]; then
+ # wtmp always takes precedence, it's safe to remove wtmpx
+ if [ -s /var/log/wtmp ]; then
+ %{__rm} -f /var/log/wtmpx
+ else
+ %{__mv} -f /var/log/wtmpx /var/log/wtmp
+ fi
+fi
+
%pre
%groupadd -g 22 utmp
@@ -221,16 +233,6 @@ if [ "$1" = "0" ]; then
%groupremove utmp
fi
-%triggerpostun -- SysVinit < 2.88-16
-if [ -e /var/log/wtmpx ]; then
- # wtmp always takes precedence, it's safe to remove wtmpx
- if [ -s /var/log/wtmp ]; then
- rm -f /var/log/wtmpx
- else
- mv /var/log/wtmpx /var/log/wtmp
- fi
-fi
-
%files
%defattr(644,root,root,755)
%doc COPYRIGHT README doc/{Changelog,Propaganda} src/initscript.sample
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/SysVinit.git/commitdiff/16c205933ca286b6759e53b67b969902b80417bd
More information about the pld-cvs-commit
mailing list