From e140445b6f29e7e8830486d96163410e79325ede Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Tue, 22 Dec 2015 23:46:15 +0100 Subject: Added a quick fix to manage local configuration for testing purpose --- lib/ManaTools/Module/Firewall.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/ManaTools/Module') diff --git a/lib/ManaTools/Module/Firewall.pm b/lib/ManaTools/Module/Firewall.pm index 873fb44b..8cfebb8e 100644 --- a/lib/ManaTools/Module/Firewall.pm +++ b/lib/ManaTools/Module/Firewall.pm @@ -139,9 +139,18 @@ has 'aboutDialog' => ( has 'conf' => ( is => 'ro', isa => 'Str', - default => sub { return $::prefix."/etc/manatools/manawall/spec.conf" }, + builder => '_confBuilder', ); +sub _confBuilder { + my $self = shift(); + my $confDir = $self->commandline()->conf_dir() || "/etc/manatools"; + chop $confDir if substr($confDir, -1) eq '/'; + $confDir .= "/manawall/spec.conf"; + + return $confDir; +} + sub _setupAboutDialog { my $self = shift(); return { -- cgit v1.2.1