Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445578 - net-p2p/bitcoind - Hardcoded paths (/var/run/, /usr/bin/bitcoind, var directory) in init script, can they be made configurable?
Summary: net-p2p/bitcoind - Hardcoded paths (/var/run/, /usr/bin/bitcoind,...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
Depends on:
Reported: 2012-12-02 08:20 UTC by Walter
Modified: 2015-03-04 00:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Walter 2012-12-02 08:20:27 UTC
The paths /var/run/ and /usr/bin/bitcoind are hardcoded at multiple places within the init script.

These paths should have a default, but be possible to specify within the /etc/conf.d/bitcoind file.

Similarly, VARDIR is fixed within the init script. It should be possible to specify within the /etc/conf.d/bitcoind file.

Reproducible: Always

Steps to Reproduce:
1. Attempt to use init script with non-standard paths
Actual Results:  
Init script errors.

Expected Results:  
Init script reports (whatever) path not found or bad, directs user to edit /etc/conf.d/bitcoind
Comment 1 Anthony Basile gentoo-dev 2014-08-29 00:15:40 UTC
We could do something like


in init.d and then in conf.d we could include those variables set to their default values but commented out with explanations.  However, I feel uneasy about letting users change these default.  Alternatively, I would feel better just leaving them out of the conf.d and in init.d doing:


Users who really know what they're doing can edit the init.d

Unless I hear some compelling reason for why we need to allow users to change those default locations, I'm going with the later.
Comment 2 Walter 2014-08-29 02:39:23 UTC
The former (variable-based) is better for multi-instance (ie. bitcoind.miner, bitcoind.coldwallet).
Comment 3 Anthony Basile gentoo-dev 2014-08-30 17:35:55 UTC
(In reply to Walter from comment #2)
> The former (variable-based) is better for multi-instance (ie.
> bitcoind.miner, bitcoind.coldwallet).

Okay, you've convinced me, but I just realized that your original post was about the old bitcoin.initd scripts.  The new ones are bitcoin.initd-r1 and from a first glance, you should be able to run multiple instances by creating sym links like follows:

> cd /etc/init.d
> ln -s bitcoind bitcoind.miner
> /etc/init.d/bitcoind.miner start

This will start up the same command `/usr/bin/bitcoind` but give you different pid files for each.

I'm testing on my end.  Test on yours and let's see fi that's good enough.
Comment 4 Luke-Jr 2015-03-03 09:55:23 UTC
I believe this is fixed in 0.10.0-r1 in the bitcoin overlay.
Comment 5 Anthony Basile gentoo-dev 2015-03-04 00:33:25 UTC
this is now fixed in the tree.  reopen if its still a problem.