]> git.pld-linux.org Git - packages/SysVinit.git/commitdiff
- moved wtmpx -> wtmp migration to pretrans auto/th/SysVinit-2.88-17 auto/ti/SysVinit-2.88-17
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 11 Nov 2013 12:08:12 +0000 (13:08 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 11 Nov 2013 12:08:12 +0000 (13:08 +0100)
It's not in trigger because wtmpx is %%ghost, and %%ghost-ed files
are removed when they'are uninstalled.

SysVinit.spec

index 6925a69edd7d1de5304b90de7f8101a0de49b789..09628b1aeef71f31c594d10a8c58e47fccce4b57 100644 (file)
@@ -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
This page took 0.133901 seconds and 4 git commands to generate.