summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-03 23:38:18 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-03 23:38:18 +0000
commit1ca54f04f64e1377ab768885ccc657307410a933 (patch)
tree834212c5ae1f6e57326ad9cd44a9df81a7964563 /usr/local
parentaa26bd27643d575830eb818b435073fe396f059b (diff)
downloadpfsense-1ca54f04f64e1377ab768885ccc657307410a933.zip
pfsense-1ca54f04f64e1377ab768885ccc657307410a933.tar.gz
Set a package needs syncing flag after a restore operation
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/diag_backup.php3
-rwxr-xr-xusr/local/www/index.php12
2 files changed, 15 insertions, 0 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 90e35ee..51c53dd 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -146,6 +146,9 @@ if ($_POST) {
$input_errors[] = "The configuration could not be restored.";
}
}
+ /* this will be picked up by /index.php */
+ touch("/needs_package_sync");
+
} else {
$input_errors[] = "The configuration could not be restored (file upload error).";
}
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 91c3bfe..dd1e60f 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -37,6 +37,18 @@ require("guiconfig.inc");
$swapinfo = `/usr/sbin/swapinfo`;
if(stristr($swapinfo,"%") == true) $showswap=true;
+/* User recently restored his config.
+ If packages are installed lets resync
+*/
+if(file_exists("/needs_package_sync")) {
+ if($config['installedpackages'] <> "") {
+ conf_mount_rw();
+ unlink("/needs_package_sync");
+ header("Location: pkg_mgr_install.php?mode=reinstallall");
+ exit;
+ }
+}
+
if(file_exists("/usr/local/www/trigger_initial_wizard")) {
conf_mount_rw();
unlink("/usr/local/www/trigger_initial_wizard");
OpenPOWER on IntegriCloud