summaryrefslogtreecommitdiffstats
path: root/urpmi.removemedia
diff options
context:
space:
mode:
Diffstat (limited to 'urpmi.removemedia')
-rwxr-xr-xurpmi.removemedia6
1 files changed, 5 insertions, 1 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia
index db586211..97fad3d9 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -43,7 +43,11 @@ where <name> is a medium name to remove.
push @toremoves, $_;
}
- my $urpm = new urpm; $urpm->read_config;
+ my $urpm = new urpm;
+ if ($< != 0) {
+ $urpm->{fatal}(1, N("Only superuser is allowed to remove media"));
+ }
+ $urpm->read_config;
my @entries = map { $_->{name} } @{$urpm->{media}};
if ($options{all}) {