Marconi fixes for precise

Fix a couple of problems found on Ubuntu:
* $MARCONI_DIR/etc/marconi/policy.json doesn't exist; removed the copy to /etc/marconi
* added a seting of nssize in /etc/mongodb.conf for Ubuntu
* restart the correct serice name on Ubuntu

Change-Id: I9bd2ab1aa4fb94ff96559e069e5b62138c358fb5
diff --git a/lib/marconi b/lib/marconi
index 1eaebbd..3d5ef82 100644
--- a/lib/marconi
+++ b/lib/marconi
@@ -82,10 +82,6 @@
     iniset $MARCONI_CONF DEFAULT verbose True
     iniset $MARCONI_CONF 'drivers:transport:wsgi' bind '0.0.0.0'
 
-    # Install the policy file for the API server
-    cp $MARCONI_DIR/etc/marconi/policy.json $MARCONI_CONF_DIR
-    iniset $MARCONI_CONF DEFAULT policy_file $MARCONI_CONF_DIR/policy.json
-
     iniset $MARCONI_CONF keystone_authtoken auth_protocol http
     iniset $MARCONI_CONF keystone_authtoken admin_user marconi
     iniset $MARCONI_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
@@ -102,9 +98,16 @@
 function configure_mongodb() {
     # Set nssize to 2GB. This increases the number of namespaces supported
     # # per database.
-    sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
-
-    restart_service mongod
+    if is_ubuntu; then
+        sudo sed -i -e "
+            s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1|
+            s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047|
+        " /etc/mongodb.conf
+        restart_service mongodb
+    elif is_fedora; then
+        sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
+        restart_service mongod
+    fi
 }
 
 # init_marconi() - Initialize etc.