diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-13 21:50:50 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-13 21:50:50 +0000 |
commit | 8a9e047d380eef88a0c25263a6451ad5481c16f1 (patch) | |
tree | b8b715da9223f334c9860cc81842aab57fe16876 /usr/local/www/pkg_mgr_install.php | |
parent | 8fc2952b05f0b484fc901830b6fd35fc55dc80cd (diff) | |
download | pfsense-8a9e047d380eef88a0c25263a6451ad5481c16f1.zip pfsense-8a9e047d380eef88a0c25263a6451ad5481c16f1.tar.gz |
If a package does not list any packages needed do not check to make sure its installed.
Diffstat (limited to 'usr/local/www/pkg_mgr_install.php')
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index 2cd1ac9..8e74558 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -289,22 +289,24 @@ if ($pkgent['depends_on_package_base_url'] <> "") { fwrite($fd_log, "cd /tmp/ && /usr/sbin/pkg_add -r " . $pkgent['depends_on_package_base_url'] . "/" . $pkgent['depends_on_package'] . "\n" . $text);; } -$status = exec_command_and_return_text("ls /var/db/pkg | grep " . $pkgent['name']); -fwrite($fd_log, "ls /var/db/pkg | grep " . $pkgent['name'] . "\n" . $status); -if($status <> "") { - update_status("Package installed. Lets finish up."); - fwrite($fd_log, "Package installed. Lets finish up.\n"); -} else { - fwrite($fd_log, "Package WAS NOT installed properly.\n"); - fclose($fd_log); - $filecontents = exec_command_and_return_text("cat " . $file); - update_progress_bar(100); - echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>"; - echo "\n<script language=\"JavaScript\">document.progholder.style.visibility='hidden';</script>"; - update_status("Package WAS NOT installed properly...Something went wrong..\n" . $filecontents); - update_output_window("Error during package installation."); - sleep(1); - die; +if ($pkgent['depends_on_package_base_url'] <> "" or $pkgent['pfsense_package_base_url'] <> "") { + $status = exec_command_and_return_text("ls /var/db/pkg | grep " . $pkgent['name']); + fwrite($fd_log, "ls /var/db/pkg | grep " . $pkgent['name'] . "\n" . $status); + if($status <> "") { + update_status("Package installed. Lets finish up."); + fwrite($fd_log, "Package installed. Lets finish up.\n"); + } else { + fwrite($fd_log, "Package WAS NOT installed properly.\n"); + fclose($fd_log); + $filecontents = exec_command_and_return_text("cat " . $file); + update_progress_bar(100); + echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';</script>"; + echo "\n<script language=\"JavaScript\">document.progholder.style.visibility='hidden';</script>"; + update_status("Package WAS NOT installed properly...Something went wrong..\n" . $filecontents); + update_output_window("Error during package installation."); + sleep(1); + die; + } } update_progress_bar($pb_percent); @@ -408,14 +410,19 @@ fwrite($fd_log, "Installed " . $name . " and the following dependencies:\n" . $d update_progress_bar($pb_percent); $pb_percent += 10; -$status = exec_command_and_return_text("ls /var/db/pkg | grep " . $pkgent['name']); -fwrite($fd_log, "ls /var/db/pkg | grep " . $pkgent['name'] . "\n" . $status); -if($status <> "") { - update_status("Package installation completed."); - fwrite($fd_log, "Package installation completed.\n"); +if ($pkgent['depends_on_package_base_url'] <> "" or $pkgent['pfsense_package_base_url'] <> "") { + $status = exec_command_and_return_text("ls /var/db/pkg | grep " . $pkgent['name']); + fwrite($fd_log, "ls /var/db/pkg | grep " . $pkgent['name'] . "\n" . $status); + if($status <> "") { + update_status("Package installation completed."); + fwrite($fd_log, "Package installation completed.\n"); + } else { + update_status("Package WAS NOT installed properly."); + fwrite($fd_log, "Package WAS NOT installed properly.\n"); + } } else { - update_status("Package WAS NOT installed properly."); - fwrite($fd_log, "Package WAS NOT installed properly.\n"); + update_status("Package installation completed."); + fwrite($fd_log, "Package installation completed.\n"); } update_progress_bar($pb_percent); |