Skip to content
Browse files

Add skip_db option for camp types with no database (by Richard Templet)

  • Loading branch information...
1 parent 1f491c6 commit 54e958b582340ba3de3990982a929c40090aa366 @jonjensen jonjensen committed with sl11 camp system Jun 23, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Camp/Master.pm
View
6 lib/Camp/Master.pm
@@ -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) {
@@ -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 );
@@ -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

0 comments on commit 54e958b

Please sign in to comment.
Something went wrong with that request. Please try again.