Skip to content

Commit

Permalink
Add skip_db option for camp types with no database (by Richard Templet)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjensen authored and sl11 camp system committed Jun 24, 2011
1 parent 1f491c6 commit 54e958b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Camp/Master.pm
Expand Up @@ -1954,8 +1954,10 @@ necessary, and vary in a controlled way between environments by virtue of being
=cut

sub install_templates {
parse_roles() unless defined $roles;
my $conf = config_hash();
unless (defined($roles) or $conf->{skip_db}) {
parse_roles();
}
my $template_path = File::Spec->catfile(type_path(), 'etc');
local $/;
for my $file (@edits) {
Expand Down Expand Up @@ -2552,6 +2554,7 @@ sub _import_db_cmd_mysql {
sub prepare_database {
my $replace = shift;
my $conf = config_hash();
return if $conf->{skip_db};
my (@roles, @sources, @dbnames);
_prepare_database_vars( $conf, \@roles, \@sources, \@dbnames );

Expand Down Expand Up @@ -2660,6 +2663,7 @@ sub server_control {
$services{ic} = \&ic_control if has_ic();
$services{rails} = \&rails_control if has_rails();
$services{$dbtype} = $db_services{$dbtype};
delete $services{db} if $conf_hash->{skip_db};

my @services = grep { defined $services{$_} } qw(
httpd
Expand Down

0 comments on commit 54e958b

Please sign in to comment.