mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-14 19:24:10 +03:00
Feature #2027: Create oneflow_auth on bootstrap
This commit is contained in:
parent
8c741e473d
commit
9c60a90fca
@ -30,10 +30,13 @@ module Migrator
|
||||
begin
|
||||
FileUtils.cp("#{VAR_LOCATION}/.one/sunstone_auth",
|
||||
"#{VAR_LOCATION}/.one/onegate_auth", :preserve => true)
|
||||
|
||||
FileUtils.cp("#{VAR_LOCATION}/.one/sunstone_auth",
|
||||
"#{VAR_LOCATION}/.one/oneflow_auth", :preserve => true)
|
||||
rescue
|
||||
puts "Error trying to copy #{VAR_LOCATION}/.one/sunstone_auth "<<
|
||||
"to #{VAR_LOCATION}/.one/onegate_auth."
|
||||
puts "Please copy the file manually."
|
||||
"to #{VAR_LOCATION}/.one/onegate_auth and #{VAR_LOCATION}/.one/oneflow_auth."
|
||||
puts "Please copy the files manually."
|
||||
end
|
||||
|
||||
@db.run "ALTER TABLE user_pool RENAME TO old_user_pool;"
|
||||
|
@ -72,7 +72,7 @@ UserPool::UserPool(SqlDB * db,
|
||||
const char * one_auth;
|
||||
ifstream file;
|
||||
|
||||
string filenames[4];
|
||||
string filenames[5];
|
||||
string error_str;
|
||||
|
||||
Nebula& nd = Nebula::instance();
|
||||
@ -147,10 +147,11 @@ UserPool::UserPool(SqlDB * db,
|
||||
filenames[1] = nd.get_var_location() + "/.one/occi_auth";
|
||||
filenames[2] = nd.get_var_location() + "/.one/ec2_auth";
|
||||
filenames[3] = nd.get_var_location() + "/.one/onegate_auth";
|
||||
filenames[4] = nd.get_var_location() + "/.one/oneflow_auth";
|
||||
|
||||
mkdir(string(nd.get_var_location() + "/.one").c_str(), S_IRWXU);
|
||||
|
||||
for (i=0 ; i < 4; i++)
|
||||
for (i=0 ; i < 5; i++)
|
||||
{
|
||||
int cfile = creat(filenames[i].c_str(), S_IRUSR | S_IWUSR);
|
||||
close(cfile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user