diff options
-rw-r--r-- | etc/inc/pkg-utils.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index bd0b553..6c5b5ad 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -387,7 +387,7 @@ function install_package($package, $pkg_info = "") { $static_output .= "failed!\n\nInstallation aborted."; update_output_window($static_output); echo "<br>Show <a href=\"pkg_mgr_install.php?showlog=true\">install log</a></center>"; - exit; + return -1; } } $static_output .= "done.\n"; diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index 2f127c5..2796bf3 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -154,10 +154,16 @@ switch($_GET['mode']) { update_output_window($static_output); break; default: - install_package($_GET['id']); - update_status("Installation of {$_GET['id']} completed."); - $static_output .= "\n\nInstallation completed."; - update_output_window($static_output); + $status = install_package($_GET['id']); + if($status == -1) { + update_status("Installation of {$_GET['id']} FAILED!"); + $static_output .= "\n\nInstallation halted."; + } else { + update_status("Installation of {$_GET['id']} completed."); + $static_output .= "\n\nInstallation completed."; + } + update_output_window($static_output); + } // Delete all temporary package tarballs and staging areas. @@ -171,4 +177,4 @@ conf_mount_ro(); if($fd_log) fclose($fd_log); -?> +?>
\ No newline at end of file |