aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-08-29 23:09:10 +0200
committerAngelo Naselli <anaselli@linux.it>2014-08-29 23:09:10 +0200
commit7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb (patch)
tree49d7b1231b7eeb87a83b229084631b6773d53d82
parent28dbac079d14ccc88fcc164f7a2e691df867c6a1 (diff)
downloadmanatools-7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb.tar
manatools-7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb.tar.gz
manatools-7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb.tar.bz2
manatools-7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb.tar.xz
manatools-7d8e3ff2d4d9f6671c7975488a8c1a00ed4e79bb.zip
- fixed reading configuration position if --name is given
- changed title to Mageia Panel
-rw-r--r--extras/conf/settings.conf2
-rw-r--r--lib/AdminPanel/MainDisplay.pm4
-rwxr-xr-xscripts/apanel.pl12
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 @@
<?xml version='1.0'?>
<settings>
- <title>Admin Panel</title>
+ <title>Mageia Panel</title>
<!--logo>images/logo_mageia.png</logo>
<icon>images/mageia.png</icon>
<log>/tmp/apanel.log</log-->
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";