summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index b0bab6637..6cf45ed24 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -77,12 +77,13 @@ sub vnew {
return interactive_http->new;
}
require c;
+ if ($su) {
+ $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
+ $su = '' if $::testing;
+ }
if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0) {
- if ($su) {
- $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
- if ($> && !$::testing) {
- exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing");
- }
+ if ($su && $>) {
+ exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing");
}
eval { require interactive_gtk };
if (!$@) {
@@ -265,6 +266,7 @@ sub ask_from_normalize {
${$e->{val}} = $li->[0] if ($e->{type} ne 'combo' || $e->{not_edit}) && !member(${$e->{val}}, @$li);
if ($e->{type} eq 'combo' && $e->{format}) {
my @l = map { $e->{format}->($_) } @{$e->{list}};
+ delete $e->{format};
each_index {
${$e->{val}} = $l[$::i] if $_ eq ${$e->{val}};
} @{$e->{list}};