upgrade.sh
changeset 104 c0b5afb89088
parent 102 485d3f7d6981
child 118 cf85d78486ce
--- a/upgrade.sh	Sun Aug 09 03:57:15 2009 +0000
+++ b/upgrade.sh	Mon Aug 10 03:29:52 2009 +0000
@@ -9,6 +9,7 @@
 
 PF_CONFDIR=$(postconf -h config_directory)
 PF_GID=$(id -g $(postconf -h mail_owner))
+POSTCONF=$(which postconf)
 LOCALE_DIR=${PREFIX}/share/locale
 DOC_DIR=${PREFIX}/share/doc/vmm
 if [ ${PREFIX} = "/usr" ]; then
@@ -41,6 +42,14 @@
 done
 cd - >/dev/null
 
+# remove misplaced manual pages
+if [ -f /usr/local/share/man/man1/vmm.1 ]; then
+    rm -f /usr/local/share/man/man1/vmm.1
+fi
+if [ -f /usr/local/share/man/man5/vmm.cfg.5 ]; then
+    rm -f /usr/local/share/man/man5/vmm.cfg.5
+fi
+
 # install manual pages
 cd man
 [ -d ${MANDIR}/man1 ] || mkdir -m 0755 -p ${MANDIR}/man1
@@ -72,3 +81,6 @@
 install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
 install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
 
+# update config file
+./update_config_0.4.x-0.5.py $POSTCONF
+