aboutsummaryrefslogtreecommitdiffstats
path: root/config/dashboard/dashboard.inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2009-05-12 20:39:55 -0400
committerjim-p <jim@pingle.org>2009-05-12 20:41:49 -0400
commitc74e4dc2ea303c9c54874c3d527be52722cb09e7 (patch)
treeaa87e25029241dd82553052b35d22d61783d26c9 /config/dashboard/dashboard.inc
parent4e5739166700711a36ed03a90d2bf18dd4c57d1f (diff)
downloadpfsense-packages-c74e4dc2ea303c9c54874c3d527be52722cb09e7.tar.gz
pfsense-packages-c74e4dc2ea303c9c54874c3d527be52722cb09e7.tar.bz2
pfsense-packages-c74e4dc2ea303c9c54874c3d527be52722cb09e7.zip
Dashboard 0.7.6
* Add IPSec Mobile Client/Tunnel Status * Show FreeBSD version on System Information * Removed the uninstall routine. It didn't work properly most of the time, and after a firmware update it actually resulted in the wrong file being replaced.
Diffstat (limited to 'config/dashboard/dashboard.inc')
-rw-r--r--config/dashboard/dashboard.inc39
1 files changed, 13 insertions, 26 deletions
diff --git a/config/dashboard/dashboard.inc b/config/dashboard/dashboard.inc
index 07f4610c..5907945a 100644
--- a/config/dashboard/dashboard.inc
+++ b/config/dashboard/dashboard.inc
@@ -3,33 +3,20 @@
function dashboard_install() {
global $g, $config;
assign_privs();
- if(!file_exists("/usr/local/www/index.php.before_dashboard")) {
- /* backup the pre-dashboard files */
- mwexec("mv /usr/local/www/index.php /usr/local/www/index.php.before_dashboard");
- mwexec("mv /usr/local/www/fbegin.inc /usr/local/www/fbegin.inc.before_dashboard");
- mwexec("mv /usr/local/www/diag_logs_filter.php /usr/local/www/diag_logs_filter.php.before_dashboard");
- mwexec("mv /usr/local/www/diag_logs_filter_dynamic.php /usr/local/www/diag_logs_filter_dynamic.php.before_dashboard");
- } else {
- /* Move the files, since we do not know what version they are, don't try to keep them. */
- mwexec("mv /usr/local/www/index.php /usr/local/www/index.php.tmp");
- mwexec("mv /usr/local/www/fbegin.inc /usr/local/www/fbegin.inc.tmp");
- mwexec("mv /usr/local/www/diag_logs_filter.php /usr/local/www/diag_logs_filter.php.tmp");
- mwexec("mv /usr/local/www/diag_logs_filter_dynamic.php /usr/local/www/diag_logs_filter_dynamic.php.tmp");
- }
- mwexec("tar xzvpf /usr/local/pkg/widgets.tgz -C /");
- assign_privs();
-}
+
+ /* Copy, then rm the files for backup. For some odd reason, mv alone does
+ * not always result in the proper file being used. */
+ mwexec("cp /usr/local/www/index.php /usr/local/www/index.php.before_dashboard");
+ mwexec("cp /usr/local/www/fbegin.inc /usr/local/www/fbegin.inc.before_dashboard");
+ mwexec("cp /usr/local/www/diag_logs_filter.php /usr/local/www/diag_logs_filter.php.before_dashboard");
+ mwexec("cp /usr/local/www/diag_logs_filter_dynamic.php /usr/local/www/diag_logs_filter_dynamic.php.before_dashboard");
-function dashboard_deinstall() {
- global $g, $config;
- assign_privs();
- if(file_exists("/usr/local/www/index.php.before_dashboard")) {
- /* restore the files prior to the dashboard package installation */
- mwexec("mv /usr/local/www/index.php.before_dashboard /usr/local/www/index.php");
- mwexec("mv /usr/local/www/fbegin.inc.before_dashboard /usr/local/www/fbegin.inc");
- mwexec("mv /usr/local/www/diag_logs_filter.php.before_dashboard /usr/local/www/diag_logs_filter.php");
- mwexec("mv /usr/local/www/diag_logs_filter_dynamic.php.before_dashboard /usr/local/www/diag_logs_filter_dynamic.php");
- }
+ mwexec("rm /usr/local/www/index.php");
+ mwexec("rm /usr/local/www/fbegin.inc");
+ mwexec("rm /usr/local/www/diag_logs_filter.php");
+ mwexec("rm /usr/local/www/diag_logs_filter_dynamic.php");
+
+ mwexec("tar xzvpf /usr/local/pkg/widgets.tgz -C /");
assign_privs();
}