Index: branches/1.0/debian/control
===================================================================
--- branches/1.0/debian/control	(revision 895)
+++ branches/1.0/debian/control	(revision 896)
@@ -10,5 +10,5 @@
 Architecture: all
 Essential: no
-Depends: ${python:Depends} (>=2.3), ganglia-monitor (>=3.0.1)
+Depends: ${python:Depends} (>=2.3), ganglia-monitor (>=3.3.8)
 Description: Job Monitoring Daemon
  Job-Monarch is a set of tools to monitor and optionally archive (batch) job
@@ -21,5 +21,5 @@
 Architecture: all
 Essential: no
-Depends: ${python:Depends} (>=2.3), gmetad (>=3.0.1), rrdtool (>=1.0), postgresql (>= 8.1.22), python-rrdtool, python-psycopg2, jobmonarch-webfrontend
+Depends: ${python:Depends} (>=2.3), gmetad (>=3.3.8), rrdtool (>=1.0), postgresql (>= 8.1.22), python-rrdtool, python-psycopg2, jobmonarch-webfrontend
 Description: Job Archiving Daemon
  Job-Monarch is a set of tools to monitor and optionally archive (batch) job
@@ -35,5 +35,5 @@
 Architecture: all
 Essential: no
-Depends: php5, php5-gd (>= 2.0), php5-pgsql (>= 4.0.0), ganglia-webfrontend (>=3.1.7)
+Depends: php5, php5-gd (>= 2.0), php5-pgsql (>= 4.0.0), ganglia-webfrontend (>=3.3.8)
 Description: Job MonArch's Web Frontend
  Job-Monarch is a set of tools to monitor and optionally archive (batch) job
Index: branches/1.0/debian/jobmonarch-jobarchived.postinst
===================================================================
--- branches/1.0/debian/jobmonarch-jobarchived.postinst	(revision 895)
+++ branches/1.0/debian/jobmonarch-jobarchived.postinst	(revision 896)
@@ -5,33 +5,32 @@
 set -e
 
-case "$1" in
-    configure)
-        # Only on install (not during upgrade)
+if [ -z "$2" ]
+then
+    # Only on install (not during upgrade)
 
-        if [ -x /etc/init.d/jobarchived ]
-        then
-            update-rc.d -f jobarchived defaults
-        fi
+    if [ -x /etc/init.d/jobarchived ]
+    then
+        update-rc.d -f jobarchived defaults
+    fi
 
-        echo ""
-        echo "Additional manual changes are required to setup jobarchived:"
-        echo ""
-        echo "1) Edit /etc/jobarchived.conf to reflect your local settings and setup:"
-        echo "   - ARCHIVE_DATASOURCES and ARCHIVE_PATH"
-        echo ""
-        echo "2) Create a 'jobarchive' database and create jobarchived's tables:" 
-        echo "   - createdb jobarchive"
-        echo "   - psql -f /usr/share/jobarchived/job_dbase.sql jobarchive"
-        echo "   - Update /var/lib/pgsql/data/pg_hba.conf by adding the following lines:"
-        echo "     local   jobarchive      jobarchive                              trust"
-        echo "     host    jobarchive      jobarchive      127.0.0.1/32            trust"
-        echo "     host    jobarchive      jobarchive      ::1/128                 trust"
-        echo "   - Restart the postgresql service"
-        echo ""
-
-        ;;
-    *)
-        ;;
-esac
+    echo ""
+    echo "Additional manual changes are required to setup jobarchived:"
+    echo ""
+    echo "1) Edit /etc/jobarchived.conf to reflect your local settings and setup:"
+    echo "   - ARCHIVE_DATASOURCES and ARCHIVE_PATH"
+    echo ""
+    echo "2) Create a 'jobarchive' database and create jobarchived's tables:" 
+    echo "   - createdb jobarchive"
+    echo "   - psql -f /usr/share/jobarchived/job_dbase.sql jobarchive"
+    echo "   - Update /var/lib/pgsql/data/pg_hba.conf by adding the following lines:"
+    echo "     local   jobarchive      jobarchive                              trust"
+    echo "     host    jobarchive      jobarchive      127.0.0.1/32            trust"
+    echo "     host    jobarchive      jobarchive      ::1/128                 trust"
+    echo "   - Restart the postgresql service"
+    echo ""
+else
+    # This is a upgrade
+    :
+fi
 
 exit 0
Index: branches/1.0/debian/jobmonarch-jobarchived.prerm
===================================================================
--- branches/1.0/debian/jobmonarch-jobarchived.prerm	(revision 895)
+++ branches/1.0/debian/jobmonarch-jobarchived.prerm	(revision 896)
@@ -6,5 +6,8 @@
 
 case "$1" in
-    remove|deconfigure)
+    deconfigure)
+        /etc/init.d/jobarchived stop || true
+        ;;
+    remove)
         # Only on removal (not during upgrade)
         /etc/init.d/jobarchived stop || true
Index: branches/1.0/debian/jobmonarch-jobmond.postinst
===================================================================
--- branches/1.0/debian/jobmonarch-jobmond.postinst	(revision 895)
+++ branches/1.0/debian/jobmonarch-jobmond.postinst	(revision 896)
@@ -5,29 +5,27 @@
 set -e
 
-case "$1" in
-    configure)
-        # Only on install (not during upgrade)
+if [ -z "$2" ]
+then
+    # Only on install (not during upgrade)
 
-        if [ -x /etc/init.d/jobmond ]
-        then
-            update-rc.d -f jobmond defaults
-        fi
+    if [ -x /etc/init.d/jobmond ]
+    then
+        update-rc.d -f jobmond defaults
+    fi
 
-        echo ""
-        echo "Additional manual changes are required to setup jobmond:"
-        echo ""
-        echo "1) Edit /etc/jobmond.conf to reflect your local settings and setup:"
-        echo "   - BATCH_API: pbs, slurm, sge (experimental), lsf (experimental)"
-        echo "2) Install the python interface to the selected batch queuing system"
-        echo "   - pbs-python (for pbs or torque)"
-        echo "   - python-pyslurm (for slurm)"
-        echo "   - pythongrid (for sge)"
-        echo "   - python-pylsf (for lsf)"
-        echo ""
-
-        ;;
-    *)
-        ;;
-esac
+    echo ""
+    echo "Additional manual changes are required to setup jobmond:"
+    echo ""
+    echo "1) Edit /etc/jobmond.conf to reflect your local settings and setup:"
+    echo "   - BATCH_API: pbs, slurm, sge (experimental), lsf (experimental)"
+    echo "2) Install the python interface to the selected batch queuing system"
+    echo "   - pbs-python (for pbs or torque)"
+    echo "   - python-pyslurm (for slurm)"
+    echo "   - python-pylsf (for lsf)"
+    echo ""
+else
+    # This is a upgrade
+    :
+fi
 
 exit 0
Index: branches/1.0/debian/jobmonarch-jobmond.prerm
===================================================================
--- branches/1.0/debian/jobmonarch-jobmond.prerm	(revision 895)
+++ branches/1.0/debian/jobmonarch-jobmond.prerm	(revision 896)
@@ -6,5 +6,8 @@
 
 case "$1" in
-    remove|deconfigure)
+    deconfigure)
+        /etc/init.d/jobmond stop || true
+        ;;
+    remove)
         # Only on removal (not during upgrade)
         /etc/init.d/jobmond stop || true
Index: branches/1.0/debian/jobmonarch-webfrontend.postinst
===================================================================
--- branches/1.0/debian/jobmonarch-webfrontend.postinst	(revision 895)
+++ branches/1.0/debian/jobmonarch-webfrontend.postinst	(revision 896)
@@ -1,6 +1,19 @@
 #!/bin/sh
 
-echo "Make sure to set your Ganglia template to job_monarch now"
-echo "" 
-echo "In your Ganglia conf.php, set this line:"
-echo "\$template_name = \"job_monarch\";"
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+set -e
+
+if [ -z "$2" ]
+then
+    # Only on install (not upgrade)
+    echo "Make sure to set your Ganglia template to job_monarch now"
+    echo "" 
+    echo "In your Ganglia conf.php, set this line:"
+    echo "\$template_name = \"job_monarch\";"
+else
+    # This is a upgrade
+    :
+fi
+
+exit 0
Index: branches/1.0/debian/jobmonarch-webfrontend.postrm
===================================================================
--- branches/1.0/debian/jobmonarch-webfrontend.postrm	(revision 895)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-
-echo "Dont forget to set your Ganglia template back to default"
Index: branches/1.0/debian/jobmonarch-webfrontend.prerm
===================================================================
--- branches/1.0/debian/jobmonarch-webfrontend.prerm	(revision 896)
+++ branches/1.0/debian/jobmonarch-webfrontend.prerm	(revision 896)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+set -e
+
+case "$1" in
+    remove)
+        # Only on removal (not during upgrade)
+        echo "Dont forget to set your Ganglia template back to default"
+        ;;
+    *)
+        ;;
+esac
+
+exit 0
Index: branches/1.0/debian/jobmonarch.postinst
===================================================================
--- branches/1.0/debian/jobmonarch.postinst	(revision 895)
+++ branches/1.0/debian/jobmonarch.postinst	(revision 896)
@@ -5,20 +5,20 @@
 set -e
 
-case "$1" in
-    configure)
-        # Only on install (not during upgrade)
-        echo "Generating random password and updating apropriate files"
-        # Generate a 8 char password for the database:
-        export DB_PASSWD=$(tr -dc A-Za-z0-9_< /dev/urandom |head -c 8 | xargs)
-        # Set the password in the SQL script 
-        sed -i -e '/^.*modify me:.*$/d' -e 's/^-- CREATE/CREATE/g' -e "s/'';/'$DB_PASSWD';/g" %{_datadir}/jobarchived/job_dbase.sql
-        # Set the password in the jobarchived config.
-        sed -i -e "s/^#JOB_SQL_PASSWORD.*$/JOB_SQL_PASSWORD\t\t: $DB_PASSWD/g" %{_sysconfdir}/jobarchived.conf
-        # Set the password in the ganglia conf.php
-        sed -i -e "s|^//\$JOB_ARCHIVE_SQL_PASSWORD.*|\$JOB_ARCHIVE_SQL_PASSWORD = \"$DB_PASSWD\"|g" %{gangliaaddonsdir}/job_monarch/conf.php
-        ;;
-    *)
-        ;;
-esac
+if [ -z "$2" ]
+then
+    # Only on install (not during upgrade)
+    echo "Generating random password and updating apropriate files"
+    # Generate a 8 char password for the database:
+    export DB_PASSWD=$(tr -dc A-Za-z0-9_< /dev/urandom |head -c 8 | xargs)
+    # Set the password in the SQL script 
+    sed -i -e '/^.*modify me:.*$/d' -e 's/^-- CREATE/CREATE/g' -e "s/'';/'$DB_PASSWD';/g" %{_datadir}/jobarchived/job_dbase.sql
+    # Set the password in the jobarchived config.
+    sed -i -e "s/^#JOB_SQL_PASSWORD.*$/JOB_SQL_PASSWORD\t\t: $DB_PASSWD/g" %{_sysconfdir}/jobarchived.conf
+    # Set the password in the ganglia conf.php
+    sed -i -e "s|^//\$JOB_ARCHIVE_SQL_PASSWORD.*|\$JOB_ARCHIVE_SQL_PASSWORD = \"$DB_PASSWD\"|g" %{gangliaaddonsdir}/job_monarch/conf.php
+else
+    # this is a upgrade
+    :
+fi
 
 exit 0
