aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-04-19 17:03:01 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-04-19 17:04:40 +0300
commit3c4af35e7ef01f33662e515859a827091774d64a (patch)
treed8636f9b1ad25f1713a924f169803034321e20af
parentc7c75b0cca25ecacad0ba2dfe7c41db836a0b17a (diff)
downloadacmeman-3c4af35e7ef01f33662e515859a827091774d64a.tar.gz
acmeman-3c4af35e7ef01f33662e515859a827091774d64a.tar.bz2
Make sure configuration defaults are applied and syntax rechecked after configuring file source module.
* acmeman: Call finalize after modifying configuration. * lib/App/Acmeman/Config.pm (finalize): New method. (new): Call finalize.
-rwxr-xr-xacmeman9
-rw-r--r--lib/App/Acmeman/Config.pm8
2 files changed, 11 insertions, 6 deletions
diff --git a/acmeman b/acmeman
index 37ed4dd..f21aa70 100755
--- a/acmeman
+++ b/acmeman
@@ -1,5 +1,5 @@
#!/bin/sh
-#!-*-perl-*-
-eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
- if 0; # not running under some shell
+#! -*-perl-*-
+eval 'exec perl -x -wS $0 ${1+"$@"}'
+ if 0;
# Copyright (C) 2017, 2018 Sergey Poznyakoff <gray@gnu.org>
@@ -565,3 +565,3 @@ my $progname = basename($0);
my $progdescr = "manages ACME certificates";
-my $debug;
+my $debug = 0;
my $dry_run;
@@ -1184,2 +1184,3 @@ if ($config->success) {
}
+ $config->finalize;
}
diff --git a/lib/App/Acmeman/Config.pm b/lib/App/Acmeman/Config.pm
index bbe1f2b..614a46a 100644
--- a/lib/App/Acmeman/Config.pm
+++ b/lib/App/Acmeman/Config.pm
@@ -32,3 +32,8 @@ sub new {
}
-
+ $self->finalize;
+ return $self;
+}
+
+sub finalize {
+ my $self = shift;
if ($self->success && exists($self->{_syntax})) {
@@ -36,3 +41,2 @@ sub new {
}
- return $self;
}

Return to:

Send suggestions and report system problems to the System administrator.