aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-11-04 22:00:03 +0100
committerAngelo Naselli <anaselli@linux.it>2014-11-05 09:24:07 +0100
commitc92050a1ba514f2899c4dfebce8e85c9032b194e (patch)
tree5e6a86eadf38b5f1411d650c9b8bbdbd32246a77 /scripts
parent4f1b1bd345ddae2f1131396824d2f1a74a542cc7 (diff)
downloadmanatools-c92050a1ba514f2899c4dfebce8e85c9032b194e.tar
manatools-c92050a1ba514f2899c4dfebce8e85c9032b194e.tar.gz
manatools-c92050a1ba514f2899c4dfebce8e85c9032b194e.tar.bz2
manatools-c92050a1ba514f2899c4dfebce8e85c9032b194e.tar.xz
manatools-c92050a1ba514f2899c4dfebce8e85c9032b194e.zip
Aligned code to adminpanel code convention
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mpan.pl15
1 files changed, 6 insertions, 9 deletions
diff --git a/scripts/mpan.pl b/scripts/mpan.pl
index 6541d45d..29b6d8e6 100755
--- a/scripts/mpan.pl
+++ b/scripts/mpan.pl
@@ -29,17 +29,15 @@ use yui;
my $cmdline = new yui::YCommandLine;
-usage() if($cmdline->find("--help") > 0 || $cmdline->find("-h") > 0);
+usage() if $cmdline->find("--help") > 0 || $cmdline->find("-h") > 0;
my $settings = getSettings();
-if($cmdline->find("--dev") > 0)
-{
+if ($cmdline->find("--dev") > 0) {
print "== Development mode ON\n";
}
-else
-{
- ask_for_authentication($settings->{priv_method}) if(is_root_capability_required());
+else {
+ ask_for_authentication($settings->{priv_method}) if is_root_capability_required();
}
my $mainWin = new AdminPanel::MainDisplay();
while (1) {
@@ -79,13 +77,12 @@ sub getSettings {
my $confDir = "/etc/mpan";
# yui commandline parser
my $pos = $cmdline->find("--conf_dir");
- if($pos > 0){
+ if ($pos > 0) {
$confDir = $cmdline->arg($pos + 1);
}
else {
$pos = $cmdline->find("--name");
- if ($pos > 0)
- {
+ if ($pos > 0) {
$confDir = "/etc/" . $cmdline->arg($pos+1);
}
}