summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr_install.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-13 21:50:50 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-13 21:50:50 +0000
commit8a9e047d380eef88a0c25263a6451ad5481c16f1 (patch)
treeb8b715da9223f334c9860cc81842aab57fe16876 /usr/local/www/pkg_mgr_install.php
parent8fc2952b05f0b484fc901830b6fd35fc55dc80cd (diff)
downloadpfsense-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-xusr/local/www/pkg_mgr_install.php53
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);
OpenPOWER on IntegriCloud