]> git.pld-linux.org Git - packages/logrotate.git/commitdiff
- check if /var/log/archive is symlink (could have been made by hand earlier);
authorTomasz Pala <gotar@pld-linux.org>
Mon, 27 Oct 2008 23:21:19 +0000 (23:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  if so, rename it and proceed as there was no archive directory at all

Changed files:
    logrotate.spec -> 1.89

logrotate.spec

index bf763e55102e520f57e67482b50aa6e74b559a71..1869243f142ce823d060a69e14c9a593d3285c7a 100644 (file)
@@ -138,15 +138,19 @@ rm -rf $RPM_BUILD_ROOT
 if [ ! -L /var/log/archiv ]; then
        if [ -d /var/log/archiv ]; then
                if [ -d /var/log/archive ]; then
-                       mv /var/log/archiv/* /var/log/archive
-                       rmdir /var/log/archiv 2>/dev/null || mv -v /var/log/archiv{,.rpmsave}
+                       if [ ! -L /var/log/archive ]; then
+                               mv /var/log/archiv/* /var/log/archive
+                               rmdir /var/log/archiv 2>/dev/null || mv -v /var/log/archiv{,.rpmsave}
+                       else
+                               mv -v /var/log/archive{,.rpmsave}
+                               mv /var/log/archiv /var/log/archive
+                       fi
                else
                        mv /var/log/archiv /var/log/archive
                fi
        fi
 
        # always have archiv symlink (until all packages from Ac use new dir)
-       install -d /var/log
        ln -s archive /var/log/archiv
 fi
 exit 0
This page took 0.120713 seconds and 4 git commands to generate.