summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/pkg-utils.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 411ff7d..2563e44 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -1132,6 +1132,15 @@ function pkg_reinstall_all() {
foreach($config['installedpackages']['package'] as $package)
$todo[] = array('name' => $package['name'], 'version' => $package['version']);
echo "One moment please, reinstalling packages...\n";
+ echo " >>> Trying to fetch package info...";
+ $pkg_info = get_pkg_info();
+ if ($pkg_info) {
+ echo " Done.\n";
+ } else {
+ $xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
+ echo "\n" . sprintf(gettext(' >>> Unable to communicate with %1$s. Please verify DNS and interface configuration, and that %2$s has functional Internet connectivity.'), $xmlrpc_base_url, $g['product_name']) . "\n";
+ return;
+ }
if(is_array($todo)) {
foreach($todo as $pkgtodo) {
$static_output = "";
OpenPOWER on IntegriCloud