Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200581 - net-p2p/btg-0.9.6 init script can't access to daemon.ini
Summary: net-p2p/btg-0.9.6 init script can't access to daemon.ini
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christoph Mende (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-28 02:58 UTC by Fabio Bonfante
Modified: 2007-11-28 17:31 UTC (History)
0 users

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


Attachments
btgd-confd (btgd-confd,356 bytes, text/plain)
2007-11-28 03:18 UTC, Fabio Bonfante
Details
btgd-init (btgd-init,1.10 KB, text/plain)
2007-11-28 03:18 UTC, Fabio Bonfante
Details
btg-0.9.6-r1.ebuild (btg-0.9.6-r1.ebuild,2.38 KB, text/plain)
2007-11-28 03:31 UTC, Fabio Bonfante
Details
btgd-init (btgd-init,1015 bytes, text/plain)
2007-11-28 03:33 UTC, Fabio Bonfante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Bonfante 2007-11-28 02:58:41 UTC
the postinst say
"BTG needs a daemon.ini and client.ini, to create them run btg-config
and put them in the user running btg (/home/p2p by default)"

i have created and configured these files and moved under /home/p2p

after some investigation.... (removing --quiet -b from /etc/init.d/btg)
-----------------------------------------------------------------------
baltasar ~ # /etc/init.d/btg start
 * Caching service dependencies ...                             [ ok ]
 * Starting BTG Daemon ...
<info> [CDataFile::Load] Unable to open file. Does it exist?
[2007-Nov-28 03:08:00] btgdaemon: Could not open configuration file '/root/.btg/daemon.ini'
-----------------------------------------------------------------------

--- /etc/conf.d/btg ----
BTG_USER="p2p"
------------------------
If i try start btgdaemon from the p2p user all works.

Well seems btgdaemon search in the root home even if start-stop-daemon is configured with "-c ${BTG_USER}"

A quick fix that works is to specify the full path of the configuration file
btgdaemon -c /path/to/daemon.ini

See attached files for details
Comment 1 Fabio Bonfante 2007-11-28 03:18:28 UTC
Created attachment 137192 [details]
btgd-confd
Comment 2 Fabio Bonfante 2007-11-28 03:18:50 UTC
Created attachment 137193 [details]
btgd-init
Comment 3 Fabio Bonfante 2007-11-28 03:31:10 UTC
Created attachment 137195 [details]
btg-0.9.6-r1.ebuild

well... it's not related to the issue, but, since i'm here...
I added a "make_desktop_entry" if the gtk use flag is set
Comment 4 Fabio Bonfante 2007-11-28 03:33:29 UTC
Created attachment 137196 [details]
btgd-init

forget to remove the check for BTG_HOME not used anymore
Comment 5 Christoph Mende (RETIRED) gentoo-dev 2007-11-28 13:34:21 UTC
fixed in cvs, thanks
Comment 6 Fabio Bonfante 2007-11-28 16:51:26 UTC
you are welcome! just 2 things
- looking at the cvs (http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/btg/files/btgd-init?view=markup)
seems the wrong initd (the first i sent) (BTG_HOME no longer exist)
- i done "all" (ok ok not so ALL much ;-) on amd64, there's the need of an issue on bugzilla for the stabilization request, or it's enough here?

well, one last thing...
can be useful another tip in the post-inst regarding to use absolute paths in daemon.ini and not the "~/" prefix (how suggested in the official how to)
Comment 7 Christoph Mende (RETIRED) gentoo-dev 2007-11-28 17:31:39 UTC
woops, commited the correct init script
the ebuild has to be 30 days in the tree before stabilization and considering I'm in the amd64 herd I can do it myself :p