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
Created attachment 144325 [details] patch for fixing problem patch tested on FreeBSD 10
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
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