diff --git a/doc/schema.mysql b/doc/schema.mysql index 379395e..09ab2a4 100644 --- a/doc/schema.mysql +++ b/doc/schema.mysql @@ -60,6 +60,7 @@ CREATE TABLE `filesets` ( `host` varchar(255) default NULL, `dir` text, `options` text, + active tinyint not null default 1, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; diff --git a/doc/schema.pgsql b/doc/schema.pgsql index 6c04f59..de6b60f 100644 --- a/doc/schema.pgsql +++ b/doc/schema.pgsql @@ -9,7 +9,8 @@ create table filesets ( id serial primary key, host varchar, dir varchar, - options varchar + options varchar, + active boolean not null default 't' ); create table files ( diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index 2ad0c9a..f406de4 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -121,6 +121,13 @@ sub new { grep { $id == $_ } @{ $opt->{filesets} } } @{ $self->{targets} } ]; + } else { + $self->{targets} = + [ + grep { + $_->{active}; + } @{ $self->{targets} } + ]; } if ($ENV{HOME} =~ m{([/\w]*)}) { if (-f "$1/.ssh/id_rsa") {