diff options
author | Matteo Pasotti <matteo@mageia.org> | 2013-01-09 16:40:23 +0000 |
---|---|---|
committer | Matteo Pasotti <matteo@mageia.org> | 2013-01-09 16:40:23 +0000 |
commit | 5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6 (patch) | |
tree | 0279f7b29f4a41aa6adc05cf017dc79c14e323b2 /AdminPanel/Rpmdragora | |
parent | 7deb546103eea4647985d5ec7bcbc97d1b0d886b (diff) | |
download | colin-keep-5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6.tar colin-keep-5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6.tar.gz colin-keep-5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6.tar.bz2 colin-keep-5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6.tar.xz colin-keep-5b97980dd59e47ebf1d6f8ca37b7cafb48410bf6.zip |
- rpmdragora: fixed warn_about_user_mode call
- rpmdragora.pm: interactive_msg now returns ask_YesOrOk() return value
- Shared.pm: ask_ routines now return boolean rather than string
- Shared.pm: added missing module requirement (common from libDrakX)
- init.pm: warn_about_user_mode rewritten to return boolean
Diffstat (limited to 'AdminPanel/Rpmdragora')
-rw-r--r-- | AdminPanel/Rpmdragora/init.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/AdminPanel/Rpmdragora/init.pm b/AdminPanel/Rpmdragora/init.pm index 06e0398..776ee4c 100644 --- a/AdminPanel/Rpmdragora/init.pm +++ b/AdminPanel/Rpmdragora/init.pm @@ -29,6 +29,7 @@ use strict; use MDK::Common::Func 'any'; use lib qw(/usr/lib/libDrakX); use common; +use English; BEGIN { $::no_global_argv_parsing = 1 } require urpm::args; @@ -155,11 +156,14 @@ our $changelog_first = $rpmdragora::changelog_first_config->[0]; $changelog_first = 1 if $rpmdragora_options{'changelog-first'}; sub warn_about_user_mode() { - $> and (AdminPanel::rpmdragora::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, -but you may still browse the existing database."), yesno => 1, text => { no => N("Cancel"), yes => N("Ok") }) - or AdminPanel::rpmdragora::myexit(0)); + my $title = N("Running in user mode"); + my $msg = N("You are launching this program as a normal user. + You will not be able to perform modifications on the system, + but you may still browse the existing database."); + if(($EUID != 0) and (!AdminPanel::rpmdragora::interactive_msg($title, $msg))) { + return 0; + } + return 1; } sub init() { |