You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Dirkjan Bussink (JIRA)" <ji...@apache.org> on 2012/11/29 11:56:58 UTC

[jira] [Created] (ZOOKEEPER-1593) Add Debian style /etc/default/zookeeper support to init script

Dirkjan Bussink created ZOOKEEPER-1593:
------------------------------------------

             Summary: Add Debian style /etc/default/zookeeper support to init script
                 Key: ZOOKEEPER-1593
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1593
             Project: ZooKeeper
          Issue Type: Improvement
          Components: scripts
    Affects Versions: 3.4.5
         Environment: Debian Linux 6.0
            Reporter: Dirkjan Bussink
            Priority: Minor


In our configuration we use a different data directory for Zookeeper. The problem is that the current Debian init.d script has the default location hardcoded:

ZOOPIDDIR=/var/lib/zookeeper/data
ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid

By using the standard Debian practice of allowing for a /etc/default/zookeeper we can redefine these variables to point to the correct location:

ZOOPIDDIR=/var/lib/zookeeper/data
ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid

[ -r /etc/default/zookeeper ] && . /etc/default/zookeeper

This currently can't be done through /usr/libexec/zkEnv.sh, since that is loaded before ZOOPIDDIR and ZOOPIDFILE are set. Any change there would therefore undo the setup made in for example /etc/zookeeper/zookeeper-env.sh.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1593) Add Debian style /etc/default/zookeeper support to init script

Posted by "Dirkjan Bussink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506393#comment-13506393 ] 

Dirkjan Bussink commented on ZOOKEEPER-1593:
--------------------------------------------

Patch against current trunk:

https://gist.github.com/b3ceebd6ad05fcae0a57
                
> Add Debian style /etc/default/zookeeper support to init script
> --------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1593
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1593
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.4.5
>         Environment: Debian Linux 6.0
>            Reporter: Dirkjan Bussink
>            Priority: Minor
>
> In our configuration we use a different data directory for Zookeeper. The problem is that the current Debian init.d script has the default location hardcoded:
> ZOOPIDDIR=/var/lib/zookeeper/data
> ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid
> By using the standard Debian practice of allowing for a /etc/default/zookeeper we can redefine these variables to point to the correct location:
> ZOOPIDDIR=/var/lib/zookeeper/data
> ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid
> [ -r /etc/default/zookeeper ] && . /etc/default/zookeeper
> This currently can't be done through /usr/libexec/zkEnv.sh, since that is loaded before ZOOPIDDIR and ZOOPIDFILE are set. Any change there would therefore undo the setup made in for example /etc/zookeeper/zookeeper-env.sh.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira