SPECS: logrotate.spec - check if /var/log/archive is symlink (could have be...

gotar gotar at pld-linux.org
Tue Oct 28 00:21:24 CET 2008


Author: gotar                        Date: Mon Oct 27 23:21:24 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- check if /var/log/archive is symlink (could have been made by hand earlier);
  if so, rename it and proceed as there was no archive directory at all

---- Files affected:
SPECS:
   logrotate.spec (1.88 -> 1.89) 

---- Diffs:

================================================================
Index: SPECS/logrotate.spec
diff -u SPECS/logrotate.spec:1.88 SPECS/logrotate.spec:1.89
--- SPECS/logrotate.spec:1.88	Fri Sep 26 12:52:42 2008
+++ SPECS/logrotate.spec	Tue Oct 28 00:21:19 2008
@@ -139,15 +139,19 @@
 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
@@ -181,6 +185,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.89  2008/10/27 23:21:19  gotar
+- check if /var/log/archive is symlink (could have been made by hand earlier);
+  if so, rename it and proceed as there was no archive directory at all
+
 Revision 1.88  2008/09/26 10:52:42  pluto
 - s/R(post):fileutils/R:coreutils/ for pretrans scriptlet (install/ln usage).
 - release 2.
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/logrotate.spec?r1=1.88&r2=1.89&f=u



More information about the pld-cvs-commit mailing list