From c83b195f258f472ce1d45305b56352bdd36cdbc0 Mon Sep 17 00:00:00 2001 From: Steve Beaver Date: Mon, 24 Jan 2022 18:13:36 +0000 Subject: [PATCH] Default repo selector to stable repo after upgrade to Plus --- src/etc/inc/pkg-utils.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index dd283f5893b..984912ec6f1 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -1705,11 +1705,11 @@ function save_repo($json) { unlink($f); } - // If config.xml still contains a reference to the custom repo, replace it - if ($config['system']['pkg_repo_conf_path'] == "{$repopath}/{$g['product_name']}-repo-custom.conf") { - $config['system']['pkg_repo_conf_path'] = "/usr/local/share/pfSense/pkg/repos/pfSense-repo-next.conf"; + // If config.xml still contains a reference to the custom repo, replace it with the "stable" repository definition + if (strpos($config['system']['pkg_repo_conf_path'], "custom") !== false) { + $config['system']['pkg_repo_conf_path'] = "/usr/local/share/pfSense/pkg/repos/pfSense-repo.conf"; write_config("-NoReMoTeBaCkUp"); - pkg_switch_repo("/usr/local/share/pfSense/pkg/repos/pfSense-repo-next.conf"); + pkg_switch_repo("/usr/local/share/pfSense/pkg/repos/pfSense-repo.conf"); } } }