Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 420157

Summary: ${AMULEHOME} do not work for amuled, amuleweb (net-p2p/amule-2.3.1)
Product: Gentoo Linux Reporter: lsching17
Component: New packagesAssignee: Gentoo net-p2p team <net-p2p>
Status: RESOLVED FIXED    
Severity: normal CC: reviewers+disabled
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/issues/297
Whiteboard:
Package list:
Runtime testing required: ---

Description lsching17 2012-06-07 22:17:21 UTC
The ${AMULEHOME} variable in the /etc/conf.d/amuled, /etc/conf.d/amuleweb do not work any more, start-stop-daemon seems to ignore environment variable


the line 25 of /etc/init.d/amuled should be changed from

	env HOME="${AMULEHOME}" start-stop-daemon --start \
		--quiet --background \
		--make-pidfile --pidfile /var/run/amuled.pid \
		-c ${AMULEUSER} \
		-x /usr/bin/amuled >${LOG}

to

	start-stop-daemon --start \
		--quiet --background \
		--make-pidfile --pidfile /var/run/amuled.pid \
		-c ${AMULEUSER} \
		--env HOME="${AMULEHOME}" \
		-x /usr/bin/amuled >${LOG}

the line 29 of /etc/init.d/amuleweb should be changed from

	env HOME="${AMULEHOME}" start-stop-daemon --start \
		--quiet -b \
		--make-pidfile --pidfile /var/run/amuleweb.pid \
		-c ${AMULEUSER} \
		-x /usr/bin/amuleweb -- ${OPTIONS} &>${LOG}

to

	start-stop-daemon --start \
		--quiet -b \
		--make-pidfile --pidfile /var/run/amuleweb.pid \
		-c ${AMULEUSER} \
		--env HOME="${AMULEHOME}" \
		-x /usr/bin/amuleweb -- ${OPTIONS} &>${LOG}



Besides, there are ebuild message that "-c" option of start-stop-daemon is deprecated, Pelase consider change to "--user"
Comment 1 lsching17 2012-06-07 22:18:30 UTC
The following message is shown when starting daemon

* WARNING: -c/--chuid is deprecated and will be removed in the future, please use -u/--user instead
Comment 2 Aaron 2013-01-14 01:22:42 UTC
Just a few clarifications as well for amuled if someone runs into any other issues...

First and foremost make sure that /home/p2p permissions are set correctly. 
Second - I would also recommend changing "-c ${AMULEUSER}" to "-u ${AMULEUSER}" to get rid of the warning message
Third - Generate a md5 pass - echo -n <your password here> | md5sum | cut -d ' ' -f 1
Fourth - Make sure /home/p2p/.aMule/amule.conf has the correct information in it

 [ExternalConnect]
 AcceptExternalConnections=1 
 ECAddress=
 ECPort=4712
 ECPassword=<pass you generated from step3>

Sorry if this is not relevant for gentoo bugs, but thought I would post this to help someone else in my shoes.

Cheers!
Comment 3 lsching17 2013-01-14 23:46:38 UTC
(In reply to comment #2)
> Just a few clarifications as well for amuled if someone runs into any other
> issues...
> 
> First and foremost make sure that /home/p2p permissions are set correctly. 
> Second - I would also recommend changing "-c ${AMULEUSER}" to "-u
> ${AMULEUSER}" to get rid of the warning message
> Third - Generate a md5 pass - echo -n <your password here> | md5sum | cut -d
> ' ' -f 1
> Fourth - Make sure /home/p2p/.aMule/amule.conf has the correct information
> in it
> 
>  [ExternalConnect]
>  AcceptExternalConnections=1 
>  ECAddress=
>  ECPort=4712
>  ECPassword=<pass you generated from step3>
> 
> Sorry if this is not relevant for gentoo bugs, but thought I would post this
> to help someone else in my shoes.
> 
> Cheers!

sorry that this is not related to this,

because my amule home is not in "/home/p2p", and it works if and only if the change in comment 1 is applied.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-31 10:57:14 UTC
Included in https://github.com/gentoo/gentoo/pull/297
Comment 5 Patrice Clement gentoo-dev 2016-01-22 10:45:46 UTC
commit e3ffbee (HEAD, origin/master, origin/HEAD, master)
Merge: 5e0dabb 1c48f49
Author: Patrice Clement <monsieurp@gentoo.org>
Date:   Fri Jan 22 10:38:10 2016 +0000

    Merge remote-tracking branch 'github/pr/297'.