Commit 442ed683 authored by anarcat's avatar anarcat Committed by anarcat

use a real drush context ('user' instead of 'home.drush') to save server-level settings

parent d5be0951
......@@ -38,7 +38,7 @@ function db_drush_init($url = null) {
$pass = drush_prompt(dt("Database password"));
system('stty echo');
print "\n"; # add a cr since the user's didn't echo
drush_set_option('master_db', "$scheme://$user:$pass@$host", 'home.drush');
drush_set_option('master_db', "$scheme://$user:$pass@$host", 'user');
}
drush_set_default('master_db_user', $user);
......
......@@ -20,7 +20,7 @@ function drush_db_post_provision_verify() {
drush_unset_option('master_db', 'drupal');
}
if (PROVISION_CONTEXT_SERVER) {
drush_set_option('master_db', drush_get_option('master_db'), 'home.drush');
drush_set_option('master_db', drush_get_option('master_db'), 'user');
}
}
......@@ -17,13 +17,14 @@ function drush_http_post_provision_verify($url = null) {
drush_unset_option('config_path', 'drupal');
}
elseif (PROVISION_CONTEXT_SERVER) {
drush_set_option('master_url', drush_get_option('master_url'), 'home.drush');
drush_set_option('web_host', drush_get_option('web_host', '127.0.0.1'), 'home.drush');
drush_set_option('web_ip', drush_get_option('web_ip', ''), 'home.drush');
drush_set_option('web_group', drush_get_option('web_group'), 'home.drush');
drush_set_option('script_user', drush_get_option('script_user'), 'home.drush');
drush_set_option('restart_cmd', drush_get_option('restart_cmd'), 'home.drush');
drush_set_option('backup_path', drush_get_option('backup_path'), 'home.drush');
drush_set_option('config_path', drush_get_option('config_path'), 'home.drush');
drush_log("saving settings in the server context");
drush_set_option('master_url', drush_get_option('master_url'), 'user');
drush_set_option('web_host', drush_get_option('web_host', '127.0.0.1'), 'user');
drush_set_option('web_ip', drush_get_option('web_ip', ''), 'user');
drush_set_option('web_group', drush_get_option('web_group'), 'user');
drush_set_option('script_user', drush_get_option('script_user'), 'user');
drush_set_option('restart_cmd', drush_get_option('restart_cmd'), 'user');
drush_set_option('backup_path', drush_get_option('backup_path'), 'user');
drush_set_option('config_path', drush_get_option('config_path'), 'user');
}
}
......@@ -150,7 +150,7 @@ class provisionConfig_drushrc_alias extends provisionConfig_drushrc {
* Server level config for drushrc.php files.
*/
class provisionConfig_drushrc_server extends provisionconfig_drushrc {
protected $context_name = 'home.drush';
protected $context_name = 'user';
public $description = 'Server drush configuration';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment