diff --git a/install.sh b/install.sh index fa2b593fe0..322a9065c2 100755 --- a/install.sh +++ b/install.sh @@ -1430,6 +1430,9 @@ if [ "$UNINSTALL" = "no" ] ; then for d in $MAKE_DIRS; do mkdir -p $DESTDIR$d done + + # Remove old migrators + rm $LIB_LOCATION/ruby/onedb/*.rb fi # --- Install/Uninstall files --- diff --git a/src/ozones/Server/etc/ozones-server.conf b/src/ozones/Server/etc/ozones-server.conf index 022158205e..8b09856d69 100644 --- a/src/ozones/Server/etc/ozones-server.conf +++ b/src/ozones/Server/etc/ozones-server.conf @@ -23,6 +23,7 @@ ###################### :databasetype: sqlite +#:databaseserver: dbuser:dbpassword@localhost #:htaccess: /var/www/.htaccess :dbdebug: no diff --git a/src/ozones/Server/lib/OZones/ApacheWritter.rb b/src/ozones/Server/lib/OZones/ApacheWritter.rb index 327874a2e4..ca3ae1fdd3 100644 --- a/src/ozones/Server/lib/OZones/ApacheWritter.rb +++ b/src/ozones/Server/lib/OZones/ApacheWritter.rb @@ -28,12 +28,20 @@ module OZones zone.vdcs.all.each{|vdc| htaccess << "RewriteRule ^#{vdc.NAME} " + "#{zone.ENDPOINT} [P]\n" + if zone.SUNSENDPOINT != nil htaccess << "RewriteRule ^sunstone_#{vdc.NAME}/(.+) " + "#{zone.SUNSENDPOINT}/$1 [P]\n" htaccess << "RewriteRule ^sunstone_#{vdc.NAME} " + "#{zone.SUNSENDPOINT}/ [P]\n" end + + if zone.SELFENDPOINT != nil + htaccess << "RewriteRule ^self_#{vdc.NAME}/(.+) " + + "#{zone.SELFENDPOINT}/$1 [P]\n" + htaccess << "RewriteRule ^self_#{vdc.NAME} " + + "#{zone.SELFENDPOINT}/ [P]\n" + end } } diff --git a/src/ozones/Server/lib/OZones/Zones.rb b/src/ozones/Server/lib/OZones/Zones.rb index 5c1230945f..6e9aae9db7 100644 --- a/src/ozones/Server/lib/OZones/Zones.rb +++ b/src/ozones/Server/lib/OZones/Zones.rb @@ -30,6 +30,7 @@ module OZones property :ONEPASS, String, :required => true property :ENDPOINT, String, :required => true property :SUNSENDPOINT, String + property :SELFENDPOINT, String has n, :vdcs diff --git a/src/ozones/Server/ozones-server.rb b/src/ozones/Server/ozones-server.rb index 84dc77d9b7..a3fb9d8b85 100755 --- a/src/ozones/Server/ozones-server.rb +++ b/src/ozones/Server/ozones-server.rb @@ -57,7 +57,20 @@ config=YAML::load(config_data) db_type = config[:databasetype] -db_url = db_type + "://" + VAR_LOCATION + "/ozones.db" +case db_type + when "sqlite" then + db_url = db_type + "://" + VAR_LOCATION + "/ozones.db" + when "mysql","postgres" then + if config[:databaseserver].nil? + warn "DB server needed for this type of DB backend" + exit -1 + end + + db_url = db_type + "://" + config[:databaseserver] + "/ozones" + else + warn "DB type #{db_type} not recognized" + exit -1 +end ############################################################################## # DB bootstrapping