]> git.pld-linux.org Git - packages/tzdata.git/commitdiff
- different approach to preserve /etc/localtime after uninstall auto/ac/tzdata-2007k-7
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 4 Mar 2008 20:00:28 +0000 (20:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    tzdata.spec -> 1.40

tzdata.spec

index 52ddc55c41f599cbd848bdcce851c565da3071e1..51fbfe5d8bc00cf58ef4328158ff118a6ca0e813 100644 (file)
@@ -113,6 +113,16 @@ rm -rf $RPM_BUILD_ROOT
 %preun
 if [ "$1" = "0" ]; then
        /sbin/chkconfig --del timezone
+
+       # save for postun
+       cp -f /etc/localtime /etc/localtime.rpmsave
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
+               mv -f /etc/localtime{.rpmsave,}
+       fi
 fi
 
 %triggerpostun -- rc-scripts < 0.4.1.4
This page took 0.12228 seconds and 4 git commands to generate.