My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1146: improvements to init script and install docu
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by thkoch2001@gmail.com, Oct 6, 2011
Hi,

first: Thanks for providing such an elaborate init script! It would be happy life for a Debian maintainer, if every upstream would provide such good scripts!

Since kernel.org is still down I'm not preparing patches now but only describing the issues for later reference.
(I know that you're not bound by Debian Policy, but it does not harm to implement it.)

a) The symlink in /etc/init.d should be named "gerrit" not "gerrit.sh"

b) Confusing line in the init script:
"To get the service to restart correctly on reboot, uncomment below (3 lines):"
If I'd really uncomment these lines, I'd get a command not found.

c) set -e in init script, compare Debian Policy 10.4

d) Recommend using of update-rc.d for Debian systems to setup symlinks in /etc/rc* ( man update-rc.d , Debian Policy 9.3 )

if the lsb header as in e) is present and there is /etc/init.d/gerrit, one can use:
update-rc.d gerrit defaults

e) add LSB compliant init info block

man insserv
http://wiki.debian.org/LSBInitScripts

### BEGIN INIT INFO
# Provides:          gerrit
# Required-Start:    $named $remote_fs $syslog
# Required-Stop:     $named $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: gerrit code review and git server
# Description:       <longer multi-line description>
### END INIT INFO

I have to test whether the X-Start-Before and X-Stop-After dependencies work as expected and don't confuse, if jenkins is not installed.

f) use lsb functions instead of echo
Nov 28, 2012
Project Member #1 edwin.ke...@gmail.com
e) was addressed by [1]

[1] https://gerrit-review.googlesource.com/38975
Sign in to add a comment

Powered by Google Project Hosting