diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-02 18:04:02 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-02 18:04:02 +0000 |
commit | 0d7c85a678bd4b0b1371b76c4dcac6b0cd750702 (patch) | |
tree | dd8549dae27e2e2bc7457744dd10e913dd93e5b1 /usr/local | |
parent | e0f91f5f3461ff2f5a73a18e418d9d92895af1e2 (diff) | |
download | pfsense-0d7c85a678bd4b0b1371b76c4dcac6b0cd750702.zip pfsense-0d7c85a678bd4b0b1371b76c4dcac6b0cd750702.tar.gz |
Correctly handle additional_files_needed now that its an array type.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index afcd3e8..912b8e5 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -349,7 +349,7 @@ foreach ($packages_to_install as $id) { foreach($package_conf['additional_files_needed'] as $afn) { update_progress_bar($pb_percent); $pb_percent += 10; - $filename = get_filename_from_url($afn['item']); + $filename = get_filename_from_url($afn['item'][0]); fwrite($fd_log, "Downloading additional files needed for package " . $filename . " ...\n"); update_status("Downloading additional files needed for package " . $filename . " ...\n"); $prefix = "/usr/local/pkg/"; @@ -358,14 +358,16 @@ foreach ($packages_to_install as $id) { $pkg_chmod = $afn['chmod']; if($afn['prefix'] <> "") $prefix = $afn['prefix']; - system("cd {$prefix} && /usr/bin/fetch " . $afn . " 2>/dev/null"); + system("cd {$prefix} && /usr/bin/fetch " . $afn['item'][0] . " 2>/dev/null"); if(stristr($filename, ".tgz") <> "") { update_status("Extracting tgz archive to -C for " . $filename); fwrite($fd_log, "Extracting tgz archive to -C for " . $filename . " ...\n"); system("/usr/bin/tar xzvf /usr/local/pkg/" . $filename . " -C / >/dev/null 2>&1"); } - if($pkg_chmod <> "") - system("/bin/chmod ${pkg_chmod} {$prefix}{$filename}"); + if($pkg_chmod <> "") { + fwrite($fd_log, "Changing file mode for {$pkg_chmod} {$prefix}{$filename}\n"); + system("/bin/chmod {$pkg_chmod} {$prefix}{$filename}"); + } } } |