aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-10-16 13:53:01 +0200
committerAngelo Naselli <anaselli@linux.it>2014-10-16 13:53:01 +0200
commit0d421e9d20fbf0b48ab922b0472b8890d7b35d63 (patch)
treea2edab5b3ab8f6228f16688a63ddee6683d20ad1 /scripts
parente59223e7737d9d85fdbb155ad30c2172f81e9774 (diff)
downloadmanatools-0d421e9d20fbf0b48ab922b0472b8890d7b35d63.tar
manatools-0d421e9d20fbf0b48ab922b0472b8890d7b35d63.tar.gz
manatools-0d421e9d20fbf0b48ab922b0472b8890d7b35d63.tar.bz2
manatools-0d421e9d20fbf0b48ab922b0472b8890d7b35d63.tar.xz
manatools-0d421e9d20fbf0b48ab922b0472b8890d7b35d63.zip
addded mandm needed files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mana17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/mana b/scripts/mana
index 2910025b..265cab97 100755
--- a/scripts/mana
+++ b/scripts/mana
@@ -38,6 +38,10 @@ my %modules = (
exec => '/usr/bin/manaservice',
descr => "manaservice: service manager",
},
+ dm => {
+ exec => '/usr/bin/manadm',
+ descr => "manadm: login manager configuration",
+ },
clock => {
exec => '/usr/bin/manaclock',
descr => "manaclock: date/time manager",
@@ -68,10 +72,15 @@ die "Command ". $cmd . " not found!\n" if !defined($modules{$cmd});
my $mod = $modules{$cmd}->{exec};
shift(@ARGV);
-if(is_root_capability_required()) {
- system("/usr/bin/pkexec", $mod, @ARGV);
-} else {
- system($mod, @ARGV);
+eval {
+ if(is_root_capability_required()) {
+ system("/usr/bin/pkexec", $mod, @ARGV);
+ } else {
+ system($mod, @ARGV);
+ }
+};
+if ( $@ ) {
+ print "ERROR: " . $@ ."\n";
}
#=============================================================