diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-17 05:34:36 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-17 05:34:36 +0000 |
commit | 23dd7ffbd39ed62088e195eaddd42447a703d992 (patch) | |
tree | d65cd2235cdf146d154b3fc66a22c443ddcc6673 /usr | |
parent | 1682dc1edd6631222e6009a5e20210e40fe13b09 (diff) | |
download | pfsense-23dd7ffbd39ed62088e195eaddd42447a703d992.zip pfsense-23dd7ffbd39ed62088e195eaddd42447a703d992.tar.gz |
use new make_dirs() and safe_mkdir() functions
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index 38bf8e4..646a057 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -32,11 +32,11 @@ require("guiconfig.inc"); require("xmlparse_pkg.inc"); /* /usr/local/pkg/ is where xml package files are stored. */ -if(!file_exists("/usr/local/pkg/")) mwexec("mkdir -p /usr/local/pkg/"); +make_dirs("/usr/local/pkg"); /* /usr/local/pkg/pf is where custom php hook packages live to alter the rules when needed */ -if(!file_exists("/usr/local/pkg/pf")) mwexec("mkdir -p /usr/local/pkg/pf"); +make_dirs("/usr/local/pkg/pf"); /* /usr/local/www/ext is where package links live for the left hand pane */ -if(!file_exists("/usr/local/www/ext/")) mwexec("mkdir -p /usr/local/www/ext"); +make_dirs("/usr/local/www/ext"); $pb_percent = 1; @@ -170,14 +170,14 @@ foreach ($packages_to_install as $id) { */ // Ensure directories are in place for pkg_add. - mwexec("mkdir {$g['www_path']}/ext/Services >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/System >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/Interfaces >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/Firewall >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/VPN >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/Status >/dev/null 2>&1"); - mwexec("mkdir {$g['www_path']}/ext/Diagnostics >/dev/null 2>&1"); - mwexec("mkdir /usr/local/pkg >/dev/null 2>&1"); + safe_mkdir("{$g['www_path']}/ext/Services", 0755); + safe_mkdir("{$g['www_path']}/ext/System", 0755); + safe_mkdir("{$g['www_path']}/ext/Interfaces", 0755); + safe_mkdir("{$g['www_path']}/ext/Firewall", 0755); + safe_mkdir("{$g['www_path']}/ext/VPN", 0755); + safe_mkdir("{$g['www_path']}/ext/Status", 0755); + safe_mkdir("{$g['www_path']}/ext/Diagnostics", 0755); + safe_mkdir("/usr/local/pkg", 0755); update_progress_bar($pb_percent); $pb_percent += 10; |