diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-12-22 23:46:15 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-12-22 23:46:15 +0100 |
commit | e140445b6f29e7e8830486d96163410e79325ede (patch) | |
tree | 5e8bb5fd9673b6f67245f5e498517ba7c52121bf | |
parent | b832530fdb864cd7d8d3d27151558d630893b5d8 (diff) | |
download | manatools-e140445b6f29e7e8830486d96163410e79325ede.tar manatools-e140445b6f29e7e8830486d96163410e79325ede.tar.gz manatools-e140445b6f29e7e8830486d96163410e79325ede.tar.bz2 manatools-e140445b6f29e7e8830486d96163410e79325ede.tar.xz manatools-e140445b6f29e7e8830486d96163410e79325ede.zip |
Added a quick fix to manage local configuration for testing purpose
-rw-r--r-- | lib/ManaTools/Module/Firewall.pm | 11 |
1 files changed, 10 insertions, 1 deletions
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 { |