From 3fb433b352f2e95422cfbe3ffef3338431adfd2a Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 25 Feb 2012 01:29:16 +0100 Subject: [PATCH] feature #1112: Names and paths for default datastores are now the same --- install.sh | 4 ++-- src/datastore/DatastorePool.cc | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index ea5fcb7e2e..a2bc187e54 100755 --- a/install.sh +++ b/install.sh @@ -100,7 +100,7 @@ if [ -z "$ROOT" ] ; then SUNSTONE_LOCATION="$LIB_LOCATION/sunstone" OZONES_LOCATION="$LIB_LOCATION/ozones" SYSTEM_DS_LOCATION="$VAR_LOCATION/system_ds" - DEFAULT_DS_LOCATION="$VAR_LOCATION/images" + DEFAULT_DS_LOCATION="$VAR_LOCATION/default_ds" RUN_LOCATION="/var/run/one" LOCK_LOCATION="/var/lock/one" INCLUDE_LOCATION="/usr/include" @@ -147,7 +147,7 @@ else SUNSTONE_LOCATION="$LIB_LOCATION/sunstone" OZONES_LOCATION="$LIB_LOCATION/ozones" SYSTEM_DS_LOCATION="$VAR_LOCATION/system_ds" - DEFAULT_DS_LOCATION="$VAR_LOCATION/images" + DEFAULT_DS_LOCATION="$VAR_LOCATION/default_ds" INCLUDE_LOCATION="$ROOT/include" SHARE_LOCATION="$ROOT/share" MAN_LOCATION="$ROOT/share/man/man1" diff --git a/src/datastore/DatastorePool.cc b/src/datastore/DatastorePool.cc index fbbbd2292e..7812eecc79 100644 --- a/src/datastore/DatastorePool.cc +++ b/src/datastore/DatastorePool.cc @@ -26,10 +26,10 @@ /* from ID 100 */ /* -------------------------------------------------------------------------- */ -const string DatastorePool::SYSTEM_DS_NAME = "system"; +const string DatastorePool::SYSTEM_DS_NAME = "system_ds"; const int DatastorePool::SYSTEM_DS_ID = 0; -const string DatastorePool::DEFAULT_DS_NAME = "default"; +const string DatastorePool::DEFAULT_DS_NAME = "default_ds"; const int DatastorePool::DEFAULT_DS_ID = 1; /* -------------------------------------------------------------------------- */ @@ -47,7 +47,9 @@ DatastorePool::DatastorePool(SqlDB * db): Datastore * ds; DatastoreTemplate * ds_tmpl; - // Build the default datastores + // --------------------------------------------------------------------- + // Create the system datastore + // --------------------------------------------------------------------- oss << "NAME = " << SYSTEM_DS_NAME << endl << "BASE_PATH = /var/lib/one/system_ds" << endl @@ -71,10 +73,13 @@ DatastorePool::DatastorePool(SqlDB * db): goto error_bootstrap; } + // --------------------------------------------------------------------- + // Create the default datastore + // --------------------------------------------------------------------- oss.str(""); oss << "NAME = " << DEFAULT_DS_NAME << endl - << "BASE_PATH = /var/lib/one/images" << endl + << "BASE_PATH = /var/lib/one/default_ds" << endl << "TYPE = fs" << endl << "TM_MAD = tm_shared";