summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm8
-rwxr-xr-xperl-install/standalone/finish-install4
2 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index ab8a3ea6b..5eff4702f 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -837,6 +837,14 @@ sub sessions_with_order() {
\%h;
}
+sub urpmi_add_all_media {
+ my ($in) = @_;
+
+ return if !network::tools::has_network_connection();
+ my $_wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
+ run_program::rooted($::prefix, 'urpmi.addmedia', '--distrib', '--mirrorlist', '$MIRRORLIST');
+}
+
sub autologin {
my ($o, $in) = @_;
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index bc54c552a..f2b8c058f 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -90,10 +90,8 @@ sub ask_network() {
sub ask_urpmi() {
#- configure urpmi media if network is up and no media are configured
require network::tools;
- return if !network::tools::has_network_connection();
run_program::get_stdout('urpmq', '--list-media') and return;
- my $_wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
- run_program::run('urpmi.addmedia', '--distrib', '--mirrorlist', '$MIRRORLIST');
+ any::urpmi_add_all_media($in);
}
sub set_authentication {