Commit fe81546f authored by Adrian Rossouw's avatar Adrian Rossouw

Add some "noop" implementations in the remote file class, to test a db only...

Add some "noop" implementations in the remote file class, to test a db only remote server. The issue was that the user account on the remote server wasnt the same. Neither were the paths
parent a8799815
......@@ -3,11 +3,38 @@
require_once DRUSH_BASE_PATH . '/commands/core/rsync.core.inc';
class provisionService_file_remote extends provisionService_file {
protected $operations = array();
function init() {
$this->config_path = $this->config_path . '--' . $this->remote_host;
parent::init();
}
function chmod($path, $perms) {
$this->_clear_state();
$this->tokens = array('@path' => $path, '@perm' => sprintf('%o', $perms));
$this->operations[] = array(__FUNCTION__, func_get_args());
$this->last_status = TRUE;
return $this;
}
function chgrp($path, $gid, $recursive = FALSE) {
$this->_clear_state();
$this->operations[] = array(__FUNCTION__, func_get_args());
$this->tokens = array('@path' => $path, '@gid' => $gid);
$this->last_status = TRUE;
return $this;
}
function chown($path, $owner, $recursive = FALSE) {
$this->_clear_state();
$this->tokens = array('@path' => $path, '@uid' => $owner);
$this->operations[] = array(__FUNCTION__, func_get_args());
$this->last_status = TRUE;
return $this;
}
function sync($path = NULL, $exclude_sites = FALSE) {
if (is_null($path)) {
$path = $this->config_path;
......
......@@ -34,7 +34,9 @@ function drush_provision_drupal_provision_verify() {
$config = new provisionConfig_global_settings(d()->name);
$config->write();
}
d()->service('file')->create_dir(d()->backup_path, dt('Backup'), 0700);
if (d()->name == '@server_localhost') {
d()->service('file')->create_dir(d()->backup_path, dt('Backup'), 0700);
}
}
elseif (d()->type === 'platform') {
d()->service('file')->writable(d()->root . '/sites')
......
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