make /usr/info a symlink if possible
Hi,
Index: dpkg.postinst
===================================================================
RCS file: /cvs/dpkg/dpkg/debian/dpkg.postinst,v
retrieving revision 1.8
diff -u -r1.8 dpkg.postinst
--- dpkg.postinst 2002/05/26 06:32:57 1.8
+++ dpkg.postinst 2002/06/21 19:32:10
@@ -122,11 +122,20 @@
ln -s ../share/doc/dpkg /usr/doc/dpkg
fi
-
-if [ ! -L /usr/info/dir ]; then
- echo "Moving /usr/info/dir to /usr/share/info/dir, and creating /usr/info/dir symlink."
+if [ -d /usr/info -a ! -L /usr/info -a ! -L /usr/info/dir ]; then
+ echo "Moving /usr/info/dir to /usr/share/info/dir."
mv /usr/info/dir /usr/share/info/dir
- ln -sf ../share/info/dir /usr/info/dir
+ if [ -f /usr/info/dir.old ]; then
+ mv /usr/info/dir.old /usr/share/info/dir.old
+ fi
+ if [ "`find /usr/info -empty`" = "/usr/info" ]; then
+ echo "Making /usr/info a symlink to /usr/share/info."
+ rmdir /usr/info
+ ln -s share/info /usr/info
+ else
+ echo "Making /usr/info/dir a symlink to /usr/share/info/dir."
+ ln -sf ../share/info/dir /usr/info/dir
+ fi
fi
(note: copied and pasted via gpm, so tabs may be lost, please apply with
appropriate patch options to ignore whitespace)
--
2. That which causes joy or happiness.
--
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: