Permalink
Browse files

tidy up

  • Loading branch information...
1 parent ad0805c commit 5241d61fc628bc6146e34ec57e04fb7b632dd07d @kharmajbird committed Dec 2, 2012
Showing with 6 additions and 14 deletions.
  1. +6 −14 genpuppet.pl
View
@@ -7,7 +7,6 @@
our $manifest, $classname;
our $include=0, $nullmailer=0, $semaphore=0;
my $var, $figfile = "./genpuppet.conf";
-#my @atomic = ( ensure, mode, owner, group, source, content, logoutput );
my @metaparms = ('before','require','subscribe','notify','recipient','options');
@@ -78,10 +77,8 @@ sub do_toplevel {
print "Use class nullmailer? [no] "; chomp ($var = <>);
if ($var) {
- print "adminaddr => ";
- chomp ($a = <>);
- print "remoterelay => ";
- chomp ($r = <>);
+ print "adminaddr => "; chomp ($a = <>);
+ print "remoterelay => "; chomp ($r = <>);
printf FP " class { 'nullmailer':\n";
printf FP " adminaddr => '$a',\n";
@@ -106,8 +103,7 @@ sub get_resources {
my $rs = @x[0];
my @savep = split (", ", @x[1]);
- print "${rs}? ";
- chomp($rsname = <>);
+ print "$rs? "; chomp($rsname = <>);
while ($rsname) {
my @params = @savep;
@@ -117,27 +113,23 @@ sub get_resources {
my @ary = ();
my $attr = shift (@params);
- print "${attr} => ";
- chomp ($resp = <>);
+ print "${attr} => "; chomp ($resp = <>);
- #if (grep /$attr/, @atomic) {
if (! grep /$attr/, @metaparms) {
if ($resp) { $resources{$rs}->{$rsname}->{$attr} = $resp; }
}
else {
while ($resp) {
push (@ary, $resp);
- print "${attr} => ";
- chomp ($resp = <>);
+ print "$attr => "; chomp ($resp = <>);
}
if (@ary) {
@{ $resources{$rs}->{$rsname}->{$attr} } = @ary;
}
}
}
- print "${rs}? ";
- chomp($rsname = <>);
+ print "$rs? "; chomp($rsname = <>);
}
print "\n";
} # end while

0 comments on commit 5241d61

Please sign in to comment.