summaryrefslogtreecommitdiffstats
path: root/perl-install/install/install2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/install2.pm')
-rw-r--r--perl-install/install/install2.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 59e828074..4b8226376 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -485,6 +485,15 @@ sub parse_args {
($cfg, $patch);
}
+sub init_env_share() {
+ if ($::testing) {
+ $ENV{SHARE_PATH} ||= "/export/install/stage2/live/usr/share";
+ $ENV{SHARE_PATH} = "/usr/share" if !-e $ENV{SHARE_PATH};
+ } else {
+ $ENV{SHARE_PATH} ||= "/usr/share";
+ }
+}
+
#-######################################################################################
#- MAIN
#-######################################################################################
@@ -501,12 +510,7 @@ sub main {
my ($cfg, $patch) = parse_args(@_);
- if ($::testing) {
- $ENV{SHARE_PATH} ||= "/export/install/stage2/live/usr/share";
- $ENV{SHARE_PATH} = "/usr/share" if !-e $ENV{SHARE_PATH};
- } else {
- $ENV{SHARE_PATH} ||= "/usr/share";
- }
+ init_env_share();
undef $::auto_install if $cfg;