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 --- extras/conf/settings.conf | 2 +- lib/AdminPanel/MainDisplay.pm | 4 ++-- scripts/apanel.pl | 12 +++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/extras/conf/settings.conf b/extras/conf/settings.conf index 000a9fe5..95a206bf 100644 --- a/extras/conf/settings.conf +++ b/extras/conf/settings.conf @@ -1,6 +1,6 @@ - Admin Panel + Mageia Panel diff --git a/lib/AdminPanel/MainDisplay.pm b/lib/AdminPanel/MainDisplay.pm index 73938ab3..cee69bc5 100644 --- a/lib/AdminPanel/MainDisplay.pm +++ b/lib/AdminPanel/MainDisplay.pm @@ -141,8 +141,8 @@ sub new { ## Default values $self->{name} = "Administration panel"; $self->{categories} = []; - $self->{confDir} = "/etc/apanel", - $self->{title} = "apanel", + $self->{confDir} = "/etc/mpan", + $self->{title} = "mpan", my $cmdline = new yui::YCommandLine; diff --git a/scripts/apanel.pl b/scripts/apanel.pl index 813c1701..75606e60 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