]> git.pld-linux.org Git - packages/tzdata.git/commitdiff
preserve as file on uninstall
authorElan Ruusamäe <glen@delfi.ee>
Mon, 30 May 2016 16:46:19 +0000 (19:46 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 30 May 2016 16:46:19 +0000 (19:46 +0300)
tzdata.spec

index eabe5d459ad33cde3a170dd1cfbbf07f070b4044..e68737d9a0e3ff18378b17b9a09cb0fd136d1577 100644 (file)
@@ -207,7 +207,10 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del timezone
 
        # save for postun
        /sbin/chkconfig --del timezone
 
        # save for postun
-       cp -af /etc/localtime /etc/localtime.rpmsave
+       localtime=$(readlink -f /etc/localtime)
+       # cp has no dereference target option, so remove link first
+       test -L /etc/localtime.rpmsave && rm -f /etc/localtime.rpmsave
+       cp -pf $localtime /etc/localtime.rpmsave
 fi
 
 %postun
 fi
 
 %postun
This page took 0.156551 seconds and 4 git commands to generate.