aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-05-28 19:47:14 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-05-28 19:47:14 +0000
commit2f055097329b3bafdd3a831f18d58441ae0b9932 (patch)
tree4a58810cef281c4edae86d82063f69058ebf5cee
parent63bcbf63e0d09af07def26c411095c280f8b3f26 (diff)
downloadrpmdrake-2f055097329b3bafdd3a831f18d58441ae0b9932.tar
rpmdrake-2f055097329b3bafdd3a831f18d58441ae0b9932.tar.gz
rpmdrake-2f055097329b3bafdd3a831f18d58441ae0b9932.tar.bz2
rpmdrake-2f055097329b3bafdd3a831f18d58441ae0b9932.tar.xz
rpmdrake-2f055097329b3bafdd3a831f18d58441ae0b9932.zip
MandrakeUpdate is not meaningful as a user
-rwxr-xr-xrpmdrake12
1 files changed, 8 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 82eff1e5..0cdfaa3d 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -41,16 +41,19 @@ use common;
use rpmdrake;
use gurpm;
+$MODE = 'install';
+$0 =~ m|/rpmdrake-remove$| and $MODE = 'remove';
+$0 =~ m|/MandrakeUpdate$| and $MODE = 'update';
+
+$MODE eq 'update' and require_root_capability();
+
+
eval { require ugtk2; ugtk2->import(qw(:all)) };
if ($@) {
print "This program cannot be run in console mode.\n";
c::_exit(0); #- skip ugtk2::END
}
-$MODE = 'install';
-$0 =~ m|/rpmdrake-remove$| and $MODE = 'remove';
-$0 =~ m|/MandrakeUpdate$| and $MODE = 'update';
-
/^-?-(\S+)$/ and $options{$1} = 1 foreach @ARGV;
@@ -61,6 +64,7 @@ sub interactive_msg_ { interactive_msg(@_, if_(exists $w->{rwindow}, transient
sub interactive_list_ { interactive_list(@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
sub wait_msg_ { wait_msg(@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
+
$> and (interactive_msg_(N("Running in user mode"),
N("You are launching this program as a normal user.
You will not be able to perform modifications on the system,