Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331729 - media-sound/mpd: convert init.d to s-s-d
Summary: media-sound/mpd: convert init.d to s-s-d
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Christoph Mende (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-09 08:12 UTC by SpanKY
Modified: 2010-09-12 16:12 UTC (History)
2 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 SpanKY gentoo-dev 2010-08-09 08:12:07 UTC
start-stop-daemon takes care of a lot of common house keeping features and helps integrate better with openrc.  it would also avoid the need for the non-portable `sleep` usage currently found in stop().

start() {
    checkconfig || return 1

    ebegin "Starting Music Player Daemon"
    start-stop-daemon --start --quiet --exec /usr/bin/mpd --pidfile /var/run/mpd.pid -- /etc/mpd.conf
    eend $?
}

stop() {
    ebegin "Stopping Music Player Daemon"
    start-stop-daemon --stop --exec /usr/bin/mpd --pidfile /var/run/mpd.pid
    eend $?
}
Comment 1 Christoph Mende (RETIRED) gentoo-dev 2010-09-10 07:49:52 UTC
+  06 Sep 2010; <angelos@gentoo.org> +mpd-0.15.12-r1.ebuild,
+  +files/mpd.conf.patch, +files/mpd.init:
+  Tweak default pid/log paths (bug #331723), fix init script dependencies
+  (bug #331725), reduce init script noise (bug #331727) and convert init
+  script to s-s-d (bug #331729)
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-09-12 15:47:26 UTC
Doesn't seem to work as expected here


Phoenix ~ # /etc/init.d/mpd restart
 * Starting Music Player Daemon ...                                                                                                                                            [ ok ]
Phoenix ~ # /etc/init.d/mpd restart
 * Stopping Music Player Daemon ...
 * start-stop-daemon: no matching processes found                                                                                                                              [ ok ]
 * Starting Music Player Daemon ...                                                                                                                                            [ ok ]
Phoenix ~ # 
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2010-09-12 16:12:21 UTC
OK ignore me. Was an error on my end