← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~andreserl/maas/packaging_update_lp1065062 into lp:~maas-maintainers/maas/packaging

 

Andres Rodriguez has proposed merging lp:~andreserl/maas/packaging_update_lp1065062 into lp:~maas-maintainers/maas/packaging.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~andreserl/maas/packaging_update_lp1065062/+merge/128988
-- 
https://code.launchpad.net/~andreserl/maas/packaging_update_lp1065062/+merge/128988
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~andreserl/maas/packaging_update_lp1065062 into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/changelog'
--- debian/changelog	2012-10-10 15:31:22 +0000
+++ debian/changelog	2012-10-10 16:13:36 +0000
@@ -2,6 +2,7 @@
 
   [ Raphaël Badin ]
   * debian/maas-region-controller.postinst: Enable proxy_http module.
+  * debian/maas-cluster-controller.postinst: Create /var/lib/maas. (LP: #1065062)
 
  -- Andres Rodriguez <andreserl@xxxxxxxxxx>  Wed, 10 Oct 2012 11:17:21 -0400
 

=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst	2012-10-09 18:17:31 +0000
+++ debian/maas-cluster-controller.postinst	2012-10-10 16:13:36 +0000
@@ -20,10 +20,14 @@
 
 create_log_dir() {
     # create log dir
+    if [ ! -d /var/lib/maas ]; then
+        mkdir -p /var/lib/maas
+    fi
     if [ ! -d /var/log/maas/oops ]; then
         mkdir -p /var/log/maas/oops
     fi
     # Give appropriate permissions
+    chown -R maas:maas /var/lib/maas/
     chown -R maas:maas /var/log/maas
     chmod -R 775 /var/log/maas/oops
 }

=== modified file 'debian/maas-cluster-controller.postrm'
--- debian/maas-cluster-controller.postrm	2012-10-09 18:17:31 +0000
+++ debian/maas-cluster-controller.postrm	2012-10-10 16:13:36 +0000
@@ -15,6 +15,13 @@
                 if [ -d /var/log/maas ]; then
                     rm -rf /var/log/maas
                 fi
+		# remove var directory
+		rm -rf /var/lib/maas/celerybeat-cluster-schedule
+		DIR=/var/lib/maas
+		if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
+			rm -rf /var/lib/maas
+		fi
+
 esac
 
 #DEBHELPER#