aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-24 07:41:20 +0000
committerOlivier Blin <blino@mageia.org>2010-11-24 07:41:20 +0000
commit9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3 (patch)
tree0926f41b2165e2197dcd628e807bb398782754d3 /iurt_root_command
parentd1ed2db927a44230a90385a2f83bdae5c480e269 (diff)
downloadiurt-9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3.tar
iurt-9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3.tar.gz
iurt-9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3.tar.bz2
iurt-9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3.tar.xz
iurt-9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3.zip
remove sudo calls, iurt_root_command is supposed to be run as root already
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command9
1 files changed, 4 insertions, 5 deletions
diff --git a/iurt_root_command b/iurt_root_command
index af51ef5..1880e44 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -36,7 +36,6 @@ $run{program_name} = $program_name;
my %authorized_modules = ('unionfs' => 1);
my %authorized_rw_bindmounts = ( map { $_ => 1 } qw(/proc /dev/pts /var/cache/icecream) );
-my $sudo = '/usr/bin/sudo';
$run{todo} = [];
@params = (
@@ -203,8 +202,8 @@ sub modprobe {
return 1;
}
}
- system($sudo, "/sbin/depmod", "-a");
- !system($sudo, "/sbin/modprobe", "-f", $module);
+ system("/sbin/depmod", "-a");
+ !system("/sbin/modprobe", "-f", $module);
}
sub mkdir {
@@ -248,7 +247,7 @@ sub rm {
plog('FAIL', "removal of $f forbidden");
$ok = 0;
} else {
- system($sudo, 'rm', '-rf', $f);
+ system('rm', '-rf', $f);
plog('DEBUG', "removing $f");
$done = 1;
}
@@ -301,7 +300,7 @@ sub cp {
plog('WARN', "can't copy directories without the -r option");
$ok = 0;
} else {
- system($sudo, 'cp', '-raf', $f);
+ system('cp', '-raf', $f);
plog('DEBUG', "copying $f -> $dest");
$done = 1;
}