summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
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
#-######################################################################################