summaryrefslogtreecommitdiffstats
path: root/perl-install/install/install2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:27:18 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:27:18 +0000
commitc10299d7656ea3a780b0970795ddbca1335b96fe (patch)
tree34a2c1923fd82f0360d5d35765e53b918b87e5d5 /perl-install/install/install2.pm
parentdec0e265a040825600d2e7b276cbcdaa517e0cee (diff)
downloaddrakx-c10299d7656ea3a780b0970795ddbca1335b96fe.tar
drakx-c10299d7656ea3a780b0970795ddbca1335b96fe.tar.gz
drakx-c10299d7656ea3a780b0970795ddbca1335b96fe.tar.bz2
drakx-c10299d7656ea3a780b0970795ddbca1335b96fe.tar.xz
drakx-c10299d7656ea3a780b0970795ddbca1335b96fe.zip
(init_path) split it out of main()
Diffstat (limited to 'perl-install/install/install2.pm')
-rw-r--r--perl-install/install/install2.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index a3237267e..5ff92fb59 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -530,6 +530,12 @@ sub init_env_share() {
}
}
+sub init_path() {
+ #- make sure we do not pick up any gunk from the outside world
+ my $remote_path = "$::prefix/sbin:$::prefix/bin:$::prefix/usr/sbin:$::prefix/usr/bin";
+ $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:$remote_path";
+}
+
sub init_mouse() {
eval { $o->{mouse} = mouse::detect($o->{modules_conf}) } if !$o->{mouse} && !$o->{nomouseprobe};
mouse::load_modules($o->{mouse});
@@ -591,9 +597,7 @@ sub main {
$o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : "/mnt";
mkdir $::prefix, 0755;
- #- make sure we do not pick up any gunk from the outside world
- my $remote_path = "$::prefix/sbin:$::prefix/bin:$::prefix/usr/sbin:$::prefix/usr/bin";
- $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:$remote_path";
+ init_path();
eval { install::any::spawnShell() };