Bug 191536 - [PATCH] devel/zookeeper rc.d script do not starts when running using /usr/sbin/service
Summary: [PATCH] devel/zookeeper rc.d script do not starts when running using /usr/sbi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Steven Kreuzer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-01 20:51 UTC by Radim Kolar
Modified: 2014-09-02 17:23 UTC (History)
2 users (show)

See Also:


Attachments
patch for fixing problem (1.24 KB, patch)
2014-07-01 22:03 UTC, Radim Kolar
no flags Details | Diff
patch for port (2.72 KB, patch)
2014-07-02 10:21 UTC, Radim Kolar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Radim Kolar 2014-07-01 20:51:29 UTC
OS - FreeBSD 10-STABLE/ i386

there is bug in rc.d start script, it requires /usr/local/bin in path which is not set when using `/sbin/service` helper

root@sanatana:~ # service zookeeper onestart
env: bash: No such file or directory
root@sanatana:~ # whereis bash
bash: /usr/local/bin/bash /usr/local/man/man1/bash.1.gz /usr/ports/shells/bash

it is caused that service script sets path not including local:

root@sanatana:~ # sh -x /usr/sbin/service zookeeper onestart
[---cut---]
+ [ -x /etc/rc.d/zookeeper ]
+ [ -x /usr/local/etc/rc.d/zookeeper ]
+ [ -n '' ]
+ exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin /usr/local/etc/rc.d/zookeeper onestart
env: bash: No such file or directory

Problem 2:

%%ZOOKEEPER_LOGDIR%% and %%ZOKEEPER_RUNDIR%% are not replaced in rc.d script
Comment 1 Radim Kolar 2014-07-01 22:03:58 UTC
Created attachment 144325 [details]
patch for fixing problem

patch tested on FreeBSD 10
Comment 2 Radim Kolar 2014-07-02 10:21:03 UTC
Created attachment 144332 [details]
patch for port

Patch improved:

- added ability to disable JMX in zookeeper by setting zookeeper_jmx=NO
- link to command line client zkCli.sh added to ${PREFIX}/bin
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-07-22 15:25:57 UTC
A commit references this bug:

Author: skreuzer
Date: Tue Jul 22 15:25:14 UTC 2014
New revision: 362548
URL: http://svnweb.freebsd.org/changeset/ports/362548

Log:
  Fix issue preventing zookeeper from starting when using service(8)
  Add ability to disable JMX in zookeeper by setting zookeeper_jmx=NO
  Link to command line client zkCli.sh added to ${PREFIX}/bin

  PR:		191536
  Submitted by:	Radim Kolar <hsn@sendmail.cz>

Changes:
  head/devel/zookeeper/Makefile
  head/devel/zookeeper/files/zookeeper.in
  head/devel/zookeeper/pkg-plist