summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
commitd59b27d5fcc346d96072ed0edb88cda0223be084 (patch)
treef605bc19591d3cf23d372a5ace6c70fbe367a620 /perl-install/interactive.pm
parent1934b3123c81c2ccb425626aa61ed29e38780ddf (diff)
downloaddrakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.gz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.bz2
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.xz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.zip
no_comment
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 6686f2999..824bd795f 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -39,11 +39,16 @@ sub new($) {
}
sub vnew {
+ my ($type, $su) = @_;
+ $su = $su eq "su";
require c;
if (c::Xtest($ENV{DISPLAY} ||= ":0")) {
+ $su && $> && exec "kdesu", "-c", "$0 @ARGV";
require interactive_gtk;
interactive_gtk->new;
} else {
+ $su && $> && die "you must be root to run this program";
+ require 'log.pm';
undef *log::l;
*log::l = sub {}; # otherwise, it will bother us :(
require interactive_newt;
@@ -51,6 +56,9 @@ sub vnew {
}
}
+sub end {}
+sub exit { exit($_[0]) }
+
#-######################################################################################
#- Interactive functions
#-######################################################################################