From c92050a1ba514f2899c4dfebce8e85c9032b194e Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Tue, 4 Nov 2014 22:00:03 +0100 Subject: Aligned code to adminpanel code convention --- scripts/mpan.pl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'scripts') 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); } } -- cgit v1.2.1