diff options
Diffstat (limited to 'config/dashboard')
-rw-r--r-- | config/dashboard/dashboard.inc | 39 | ||||
-rw-r--r-- | config/dashboard/dashboard.xml | 7 |
2 files changed, 15 insertions, 31 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(); } diff --git a/config/dashboard/dashboard.xml b/config/dashboard/dashboard.xml index 3b6de1b0..799504ba 100644 --- a/config/dashboard/dashboard.xml +++ b/config/dashboard/dashboard.xml @@ -7,7 +7,7 @@ /* $Id$ */ /* ========================================================================== */ /* - authng.xml + dashboard.xml part of pfSense (http://www.pfSense.com) Copyright (C) 2007 to whom it may belong All rights reserved. @@ -46,7 +46,7 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>dashboard</name> - <version>0.7.5.3</version> + <version>0.7.6</version> <title>Dashboard</title> <include_file>/usr/local/pkg/dashboard.inc</include_file> <additional_files_needed> @@ -62,7 +62,4 @@ <custom_php_install_command> dashboard_install(); </custom_php_install_command> - <custom_php_deinstall_command> - dashboard_deinstall(); - </custom_php_deinstall_command> </packagegui> |