Closed Bug 856598 Opened 12 years ago Closed 11 years ago

./checksetup.pl should exit(1) if it fails checks

Categories

(Bugzilla :: Installation & Upgrading, enhancement)

4.2.5
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: docwhat, Unassigned)

Details

Attachments

(1 file)

What happens: If you have a bugzilla setup that is missing configurations, etc. (e.g. you don't have the right password for the database in localconfig) and you run './checksetup.pl' it will quit with exit code 0. What I expected: './checksetup.pl' should return a non-zero exit code. Notes: This makes scripting the checksetup.pl possible. Which is useful for controlled deploying of bugzilla. The fix is to change the following line: diff --git a/checksetup.pl b/checksetup.pl index 6d9230d..65c4fd7 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -86,7 +86,7 @@ exit if $switch{'version'}; my $module_results = check_requirements(!$silent); Bugzilla::Install::Requirements::print_module_instructions( $module_results, !$silent); -exit if !$module_results->{pass}; +exit(1) if !$module_results->{pass}; # Break out if checking the modules is all we have been asked to do. exit if $switch{'check-modules'};
Assignee: administration → installation
Severity: normal → enhancement
Component: Administration → Installation & Upgrading
This patch should help.
Comment on attachment 8366796 [details] [diff] [review] 0001-Fix-some-exit-values.patch r=gerv. Thanks for the patch, Christian :-) For future reference, it's good to request review on your patches, otherwise no-one may notice them! Gerv
Attachment #8366796 - Flags: review+
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 5.0
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 2b7da8b..f0f5194 master -> master Christian: thanks again, and sorry for the delay. Please do continue to contribute to Bugzilla :-) Gerv
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: