summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-29 03:00:46 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-29 03:00:46 +0000
commit5341c5d48c20d41301a0c167006ed05564e3b68d (patch)
treee2f85ed8d8ebe2293221919b98c05633d6bb75fd
parentd6ad7abbebca2c7b2b4fd17547ddd85ae1c3e4c2 (diff)
downloadurpmi-5341c5d48c20d41301a0c167006ed05564e3b68d.tar
urpmi-5341c5d48c20d41301a0c167006ed05564e3b68d.tar.gz
urpmi-5341c5d48c20d41301a0c167006ed05564e3b68d.tar.bz2
urpmi-5341c5d48c20d41301a0c167006ed05564e3b68d.tar.xz
urpmi-5341c5d48c20d41301a0c167006ed05564e3b68d.zip
Add rurpmi
-rw-r--r--rurpmi15
1 files changed, 15 insertions, 0 deletions
diff --git a/rurpmi b/rurpmi
new file mode 100644
index 00000000..21a9c0ba
--- /dev/null
+++ b/rurpmi
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -T
+
+use strict;
+use urpm::msg;
+
+if ($< != 0) {
+ print STDERR N("Only superuser is allowed to install packages"), "\n";
+ exit 1;
+}
+
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+delete @ENV{qw(ENV BASH_ENV IFS CDPATH PERLLIB PERL5LIB PERL5OPT PERLIO PERLIO_DEBUG PERL5DB PERL_ENCODING PERL_HASH_SEED PERL_SIGNALS PERL_UNICODE)};
+
+print STDERR N("Running urpmi in restricted mode..."), "\n";
+exec '/usr/bin/perl', '/usr/sbin/urpmi', '--restricted', @ARGV;