summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-07 15:15:41 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-07 15:15:41 -0300
commit3c4392eef7146934f23a638ef46775495e431feb (patch)
treeae6e8211b0d65982dec32712cf1bf0df72beaef1 /etc/inc
parenteb9cc9439aceeb7f7098d50cefb9e9f3635affb9 (diff)
downloadpfsense-3c4392eef7146934f23a638ef46775495e431feb.zip
pfsense-3c4392eef7146934f23a638ef46775495e431feb.tar.gz
Add a note to implement pkg_reinstall_all later
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pkg-utils.inc42
1 files changed, 2 insertions, 40 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 83e646d..b052b0c 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -718,46 +718,8 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
function pkg_reinstall_all() {
global $g, $config;
- @unlink('/conf/needs_package_sync');
- if (is_array($config['installedpackages']['package'])) {
- echo gettext("One moment please, reinstalling packages...\n");
- echo gettext(" >>> Trying to fetch package info...");
- log_error(gettext("Attempting to reinstall all packages"));
- $pkg_info = get_pkg_info();
- if ($pkg_info) {
- echo " Done.\n";
- } else {
- $xmlrpc_base_url = get_active_xml_rpc_base_url();
- $error = 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']);
- echo "\n{$error}\n";
- log_error(gettext("Cannot reinstall packages: ") . $error);
- return;
- }
- $todo = array();
- $all_names = array();
- foreach ($config['installedpackages']['package'] as $package) {
- $todo[] = array('name' => $package['name'], 'version' => $package['version']);
- $all_names[] = $package['name'];
- }
- $package_name_list = gettext("List of packages to reinstall: ") . implode(", ", $all_names);
- echo " >>> {$package_name_list}\n";
- log_error($package_name_list);
-
- foreach ($todo as $pkgtodo) {
- $static_output = "";
- if ($pkgtodo['name']) {
- log_error(gettext("Uninstalling package") . " {$pkgtodo['name']}");
- uninstall_package($pkgtodo['name']);
- log_error(gettext("Finished uninstalling package") . " {$pkgtodo['name']}");
- log_error(gettext("Reinstalling package") . " {$pkgtodo['name']}");
- install_package($pkgtodo['name'], '', true);
- log_error(gettext("Finished installing package") . " {$pkgtodo['name']}");
- }
- }
- log_error(gettext("Finished reinstalling all packages."));
- } else {
- echo "No packages are installed.";
- }
+ // XXX: implement
+ return;
}
function stop_packages() {
OpenPOWER on IntegriCloud