From 7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Fri, 29 Aug 2014 23:09:10 +0200 Subject: - fixed reading configuration position if --name is given - changed title to Mageia Panel --- scripts/apanel.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/apanel.pl b/scripts/apanel.pl index 813c170..75606e6 100755 --- a/scripts/apanel.pl +++ b/scripts/apanel.pl @@ -75,13 +75,19 @@ sub usage { # adpanel settings sub getSettings { my ($self) = @_; + + my $confDir = "/etc/mpan"; # yui commandline parser my $pos = $cmdline->find("--conf_dir"); - my $confDir = "/etc/apanel"; if($pos > 0){ $confDir = $cmdline->arg($pos + 1); - }else{ - $confDir = "/etc/apanel"; + } + else { + $pos = $cmdline->find("--name"); + if ($pos > 0) + { + $confDir = "/etc/" . $cmdline->arg($pos+1); + } } # configuration file name my $fileName = "$confDir/settings.conf"; -- cgit v1.2.1