From f9626e574bc2d69beb866e478c2b1d37e9e24660 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 30 Dec 2010 10:30:43 -0700 Subject: Only unlink /conf/needs_package_sync if no packages are installed, otherwise leave it to the package manager to take care of it. --- usr/local/www/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 7ee87cb..c1fdc26 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -110,14 +110,15 @@ if (!is_array($config['widgets'])) { ## User recently restored his config. ## If packages are installed lets resync if(file_exists('/conf/needs_package_sync')) { - if($config['installedpackages'] <> '') { - conf_mount_rw(); - @unlink('/conf/needs_package_sync'); - conf_mount_ro(); + if($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) { if($g['platform'] == "pfSense" || $g['platform'] == "nanobsd") { header('Location: pkg_mgr_install.php?mode=reinstallall'); exit; } + } else { + conf_mount_rw(); + @unlink('/conf/needs_package_sync'); + conf_mount_ro(); } } -- cgit v1.1