Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 210234 - net-im/ejabberd init script should not use env with start-stop-daemon
Summary: net-im/ejabberd init script should not use env with start-stop-daemon
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Net-im project
URL:
Whiteboard:
Keywords:
: 255362 (view as bug list)
Depends on: 281366
Blocks:
  Show dependency tree
 
Reported: 2008-02-15 11:54 UTC by Luca Barbato
Modified: 2010-06-21 08:00 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Barbato gentoo-dev 2008-02-15 11:54:15 UTC
The current init script is bogus for openrc since env isn't a deamon and returns.

probably running erl with the -name option could work alike
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2008-02-18 15:17:40 UTC
I've noted the start up issue too, but I don't understand your suggestion.

But please feel free to modify/bump/do whatever you'd like to do to this to make it better! :)
Comment 2 Luca Barbato gentoo-dev 2008-02-18 20:52:51 UTC
I misunderstood completely the erl parameter (my setup seems to miss the manpages), still I'll give a try soon
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2008-02-22 16:40:00 UTC
One thing I've tried here is:

        start-stop-daemon --start --quiet --chuid jabber:jabber -e HOME=/var/run/jabber \
                --exec /usr/bin/ejabberd -- -noshell -detached

I still get an error on startup, but at least "env" isn't being used anymore.
Comment 4 Luca Barbato gentoo-dev 2008-02-22 16:57:07 UTC
something alike

export HOME=/var/run/jabber
su -m -c /usr/bin/ejabberd jabber

could be an 1/2 solution maybe?
Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2008-02-22 17:04:21 UTC
works for me if you're happy with it (providing that su is installed on the machine).
Comment 6 Craig Andrews gentoo-dev 2008-09-25 01:44:04 UTC
The su solution is kinda uncool... Roy, do you have any ideas?
Comment 7 Roy Marples 2008-09-25 08:52:37 UTC
The su solution is the correct one - /usr/sbin/ejabberd is just a script that in turn launches daemons. As such it should not be used with s-s-s.

So either use the su soltuion OR put that script into the init script and use s-s-d for the real daemons.
Comment 8 Craig Andrews gentoo-dev 2008-09-26 02:42:38 UTC
(In reply to comment #7)
> The su solution is the correct one - /usr/sbin/ejabberd is just a script that
> in turn launches daemons. As such it should not be used with s-s-s.
> 
> So either use the su soltuion OR put that script into the init script and use
> s-s-d for the real daemons.
> 

So which solution do the portage maintainers want? I don't want to implementation a solution that won't be acceptable :-)
Comment 9 Roy Marples 2008-09-26 07:12:27 UTC
The only reason to move the logic of /usr/sbin/ejabberd to /etc/init.d/ejabberd would be so that OpenRC can track the daemons to ensure they are still running.
Otherwise there is no gain.
Comment 10 Wormo (RETIRED) gentoo-dev 2009-01-19 02:54:01 UTC
*** Bug 255362 has been marked as a duplicate of this bug. ***
Comment 11 Peter Volkov (RETIRED) gentoo-dev 2010-01-23 18:49:25 UTC
JFI: With version bump, I'm going to make init script just a wrapper around ejabberdctl. Probably there should be another way around, but without close work with upstream, I'd better not go any different way.
Comment 12 Peter Volkov (RETIRED) gentoo-dev 2010-06-21 08:00:57 UTC
Should be fixed in 2.1.4.