Commit b80eec89 authored by drumm's avatar drumm Committed by Neil Drumm

Restore server-level ~/.drushrc.php management.

parent 44b920db
......@@ -3,3 +3,12 @@
function drush_http_provision_verify() {
provision_service('http')->verify();
}
function drush_http_post_provision_verify() {
if (PROVISION_CONTEXT_SERVER) {
drush_set_option('master_url', drush_get_option('master_url'), 'user');
drush_set_option('script_user', drush_get_option('script_user'), 'user');
drush_set_option('backup_path', drush_get_option('backup_path'), 'user');
drush_set_option('config_path', drush_get_option('config_path'), 'user');
}
}
......@@ -122,6 +122,9 @@ function provision_drupal_drush_exit() {
provision_save_platform_data();
}
}
elseif (PROVISION_CONTEXT_SERVER) {
provision_save_server_data();
}
}
}
......
......@@ -171,6 +171,14 @@ class provisionConfig_drushrc_alias extends provisionConfig_drushrc {
}
}
/**
* Server level config for drushrc.php files.
*/
class provisionConfig_drushrc_server extends provisionConfig_drushrc {
protected $context_name = 'user';
public $description = 'Server drush configuration';
}
/**
* Class for writing $platform/drushrc.php files.
*/
......
......@@ -47,6 +47,16 @@ function provision_save_platform_data() {
}
}
/**
* Save modified options to the drushrc.php file
*/
function provision_save_server_data() {
if (!drush_get_error()) {
$config = new provisionConfig_drushrc_server();
$config->write();
}
}
/**
* @} End of "defgroup sitedata".
*/
......
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