[Pkg-mailman-hackers] Pkg-mailman commit - rev 92 - branches/pkg-split/core/debian

Bernd S. Brentrup bsb@haydn.debian.org
Wed, 28 Apr 2004 03:24:33 -0600


Author: bsb
Date: 2004-04-28 03:24:30 -0600 (Wed, 28 Apr 2004)
New Revision: 92

Modified:
   branches/pkg-split/core/debian/preinst
Log:
Make sure no symlink cruft is left over in /var/lib/mailman.

Modified: branches/pkg-split/core/debian/preinst
===================================================================
--- branches/pkg-split/core/debian/preinst	2004-04-26 05:30:24 UTC (rev 91)
+++ branches/pkg-split/core/debian/preinst	2004-04-28 09:24:30 UTC (rev 92)
@@ -27,7 +27,8 @@
     fi
 fi
 
-pythonlib=/var/lib/mailman/pythonlib
+mm_home=/var/lib/mailman
+pythonlib=${mm_home}/pythonlib
 
 if [ -d ${pythonlib} ] && [ "$(ls -A ${pythonlib})" != "" ] ; then
     cat <<EOF 
@@ -47,24 +48,15 @@
             ;;
     esac
 fi
-if [ -L ${pythonlib} ] ; then
-    cat <<EOF
-You have a symbolic link ${pythonlib} pointing to $(readlink ${pythonlib})
-while mailman installs ${pythonlib} as a directory.
 
-If you want it to be moved to ${pythonlib}.obsolete.$$ now, answer Y
-to the following question, any other response will abort installation
-and give you the opportunity to examine the situation.
-EOF
-    read -p "Move ${pythonlib} out of the way? [yN] " ans
-    case $ans in
-        y|Y)  mv ${pythonlib} ${pythonlib}.obsolete.$$
-            ;;
-        *) exit 1
-            ;;
-    esac
-fi
+# Before unpacking make sure no symlink cruft is left in ${mm_home}
+for d in Mailman bin cron mail pythonlib scripts ; do
+    if [ -L ${mm_home}/${d} ]; then
+        rm -f ${mm_home}/${d}
+    fi
+done
 
+
 #DEBHELPER#
 
 exit 0