diff options
author | Jim Pingle <jim@pingle.org> | 2009-03-31 12:08:42 -0400 |
---|---|---|
committer | Jim Pingle <jim@pingle.org> | 2009-03-31 12:08:42 -0400 |
commit | 4cb72cb340b940e9f9dad901b89b31eaf02e6800 (patch) | |
tree | 16a77a6e74e404b280bff9c85d220f7e1cadd006 /config | |
parent | 8b828193e803bcf83bbfb70e6c6f2cd8c72851f2 (diff) | |
download | pfsense-packages-4cb72cb340b940e9f9dad901b89b31eaf02e6800.tar.gz pfsense-packages-4cb72cb340b940e9f9dad901b89b31eaf02e6800.tar.bz2 pfsense-packages-4cb72cb340b940e9f9dad901b89b31eaf02e6800.zip |
Dashboard 0.7.5.3 - Attempt to fix uninstall/reinstall issues.
Diffstat (limited to 'config')
-rw-r--r-- | config/dashboard/dashboard.inc | 34 | ||||
-rw-r--r-- | config/dashboard/dashboard.xml | 2 |
2 files changed, 21 insertions, 15 deletions
diff --git a/config/dashboard/dashboard.inc b/config/dashboard/dashboard.inc index 0eab0a3a..07f4610c 100644 --- a/config/dashboard/dashboard.inc +++ b/config/dashboard/dashboard.inc @@ -5,10 +5,16 @@ function dashboard_install() { assign_privs(); if(!file_exists("/usr/local/www/index.php.before_dashboard")) { /* backup the pre-dashboard files */ - 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"); + 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(); @@ -19,10 +25,10 @@ function dashboard_deinstall() { assign_privs(); if(file_exists("/usr/local/www/index.php.before_dashboard")) { /* restore the files prior to the dashboard package installation */ - mwexec("cp /usr/local/www/index.php.before_dashboard /usr/local/www/index.php"); - mwexec("cp /usr/local/www/fbegin.inc.before_dashboard /usr/local/www/fbegin.inc"); - mwexec("cp /usr/local/www/diag_logs_filter.php.before_dashboard /usr/local/www/diag_logs_filter.php"); - mwexec("cp /usr/local/www/diag_logs_filter_dynamic.php.before_dashboard /usr/local/www/diag_logs_filter_dynamic.php"); + 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"); } assign_privs(); } @@ -35,12 +41,12 @@ function assign_privs() { mwexec("chown root:wheel /usr/local/www/stats.php"); mwexec("chown root:wheel /usr/local/www/diag_logs_filter.php"); mwexec("chown root:wheel /usr/local/www/diag_logs_filter_dynamic.php"); - mwexec("chmod a+rw /usr/local/www/index.php"); - mwexec("chmod a+rw /usr/local/www/fbegin.php"); - mwexec("chmod a+rw /usr/local/www/graph_cpu.php"); - mwexec("chmod a+rw /usr/local/www/stats.php"); - mwexec("chmod a+rw /usr/local/www/diag_logs_filter.php"); - mwexec("chmod a+rw /usr/local/www/diag_logs_filter_dynamic.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/index.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/fbegin.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/graph_cpu.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/stats.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/diag_logs_filter.php"); + mwexec("chmod ug+rw,o-w /usr/local/www/diag_logs_filter_dynamic.php"); } ?>
\ No newline at end of file diff --git a/config/dashboard/dashboard.xml b/config/dashboard/dashboard.xml index 0e58b70f..3b6de1b0 100644 --- a/config/dashboard/dashboard.xml +++ b/config/dashboard/dashboard.xml @@ -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.2</version> + <version>0.7.5.3</version> <title>Dashboard</title> <include_file>/usr/local/pkg/dashboard.inc</include_file> <additional_files_needed> |