diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2004-04-20 07:50:57 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2004-04-20 07:50:57 +0000 |
commit | ca846a85cc78e5f54aef2cff0ba9a35ed26aa1e3 (patch) | |
tree | 131e6a51d6bd65f5f6ba54df4c863f5a3639133d /media-sound | |
parent | Added to ~ppc (Manifest recommit) (diff) | |
download | gentoo-2-ca846a85cc78e5f54aef2cff0ba9a35ed26aa1e3.tar.gz gentoo-2-ca846a85cc78e5f54aef2cff0ba9a35ed26aa1e3.tar.bz2 gentoo-2-ca846a85cc78e5f54aef2cff0ba9a35ed26aa1e3.zip |
Init script reworked per upstream request. Bug #48210.
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/mpd/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/mpd/files/mpd.conf | 12 | ||||
-rw-r--r-- | media-sound/mpd/files/mpd.rc6 | 44 | ||||
-rw-r--r-- | media-sound/mpd/mpd-0.10.2.ebuild | 16 | ||||
-rw-r--r-- | media-sound/mpd/mpd-0.10.3.ebuild | 16 | ||||
-rw-r--r-- | media-sound/mpd/mpd-0.9.4.ebuild | 16 |
6 files changed, 52 insertions, 58 deletions
diff --git a/media-sound/mpd/ChangeLog b/media-sound/mpd/ChangeLog index 48f8a517e360..9acd793422d2 100644 --- a/media-sound/mpd/ChangeLog +++ b/media-sound/mpd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/mpd # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.22 2004/04/14 10:15:02 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.23 2004/04/20 07:50:56 eradicator Exp $ + + 20 Apr 2004; Jeremy Huddleston <eradicator@gentoo.org> mpd-0.10.2.ebuild, + mpd-0.10.3.ebuild, mpd-0.9.4.ebuild, files/mpd.conf, files/mpd.rc6: + Init script reworked per upstream request. Bug #48210. 14 Apr 2004; Jeremy Huddleston <eradicator@gentoo.org> mpd-0.10.1.ebuild: Removing old ebuilds. diff --git a/media-sound/mpd/files/mpd.conf b/media-sound/mpd/files/mpd.conf deleted file mode 100644 index 3044de61d379..000000000000 --- a/media-sound/mpd/files/mpd.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright 1999-2004 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.conf,v 1.2 2004/03/03 15:19:49 mholzer Exp $ - -#CONFIG-FILE for /etc/init.d/mpd - -# the required parameters -PORT="2100" -MUSIC_DIR="" -PLAYLIST_DIR="" -LOG_FILE="/var/log/mpd.log" -ERROR_FILE="/var/log/mpd.error" diff --git a/media-sound/mpd/files/mpd.rc6 b/media-sound/mpd/files/mpd.rc6 index da49aee28b20..067a421a58c6 100644 --- a/media-sound/mpd/files/mpd.rc6 +++ b/media-sound/mpd/files/mpd.rc6 @@ -1,47 +1,37 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.rc6,v 1.4 2004/03/04 06:23:43 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.rc6,v 1.5 2004/04/20 07:50:57 eradicator Exp $ depend() { need localmount } checkconfig() { - if [ -z "$PORT" ] || \ - [ -z "$MUSIC_DIR" ] || \ - [ -z "$PLAYLIST_DIR" ] || \ - [ -z "$LOG_FILE" ] || \ - [ -z "$ERROR_FILE" ] - then - eerror "You need to set PORT, MUSIC_DIR, PLAYLIST_DIR," - eerror "LOG_FILE and ERROR_FILE in /etc/conf.d/mpd" - return 1 - fi + if [ -f /etc/conf.d/mpd ]; then + eerror "Please remove the /etc/conf.d/mpd file as it is no longer used." + eerror "You may configure your mpd settings in /etc/mpd.conf" + fi + + if ! [ -f /etc/mpd.conf ]; then + eerror "Configureation file /etc/mpd/mpd.conf does not exist." + return 1 + fi + + return 0 } start() { - ebegin "Starting Music Player Daemon" - - if [ -f "/etc/mpd.conf" ] - then - /usr/bin/mpd /etc/mpd.conf - else - checkconfig || return 1 - /usr/bin/mpd ${PORT} \ - ${MUSIC_DIR} \ - ${PLAYLIST_DIR} \ - ${LOG_FILE} \ - ${ERROR_FILE} - fi + checkconfig || return 1 + ebegin "Starting Music Player Daemon" + start-stop-daemon --start --quiet --exec /usr/bin/mpd \ + --pidfile /var/run/mpd --make-pidfile -- --no-create-db eend $? } stop() { ebegin "Stopping Music Player Daemon" - - killall mpd &>/dev/null - + start-stop-daemon --stop --quiet --pidfile /var/run/mpd eend $? } diff --git a/media-sound/mpd/mpd-0.10.2.ebuild b/media-sound/mpd/mpd-0.10.2.ebuild index 06597968a97e..0af4d8875861 100644 --- a/media-sound/mpd/mpd-0.10.2.ebuild +++ b/media-sound/mpd/mpd-0.10.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.10.2.ebuild,v 1.4 2004/03/30 18:19:57 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.10.2.ebuild,v 1.5 2004/04/20 07:50:56 eradicator Exp $ IUSE="oggvorbis mad aac audiofile ipv6" @@ -42,16 +42,20 @@ src_install() { dodoc COPYING ChangeLog INSTALL README TODO UPGRADING dodoc doc/COMMANDS doc/mpdconf.example + insinto /etc + newins doc/mpdconf.example mpd.conf + exeinto /etc/init.d newexe ${FILESDIR}/mpd.rc6 mpd - insinto /etc/conf.d - newins ${FILESDIR}/mpd.conf mpd + + dosed 's:^port.*$:port "2100":' /etc/mpd.conf + dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf + dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf + dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf + dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf } pkg_postinst() { einfo "libao prior to 0.8.4 has issues with the ALSA drivers, please refer to the FAQ" einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." - einfo - einfo " You need to set PORT, MUSIC_DIR, PLAYLIST_DIR," - einfo " LOG_FILE and ERROR_FILE in /etc/conf.d/mpd" } diff --git a/media-sound/mpd/mpd-0.10.3.ebuild b/media-sound/mpd/mpd-0.10.3.ebuild index 221fce960686..dc6e4abab863 100644 --- a/media-sound/mpd/mpd-0.10.3.ebuild +++ b/media-sound/mpd/mpd-0.10.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.10.3.ebuild,v 1.3 2004/04/14 02:19:24 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.10.3.ebuild,v 1.4 2004/04/20 07:50:56 eradicator Exp $ IUSE="oggvorbis mad aac audiofile ipv6" @@ -42,16 +42,20 @@ src_install() { dodoc COPYING ChangeLog INSTALL README TODO UPGRADING dodoc doc/COMMANDS doc/mpdconf.example + insinto /etc + newins doc/mpdconf.example mpd.conf + exeinto /etc/init.d newexe ${FILESDIR}/mpd.rc6 mpd - insinto /etc/conf.d - newins ${FILESDIR}/mpd.conf mpd + + dosed 's:^port.*$:port "2100":' /etc/mpd.conf + dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf + dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf + dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf + dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf } pkg_postinst() { einfo "libao prior to 0.8.4 has issues with the ALSA drivers, please refer to the FAQ" einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." - einfo - einfo " You need to set PORT, MUSIC_DIR, PLAYLIST_DIR," - einfo " LOG_FILE and ERROR_FILE in /etc/conf.d/mpd" } diff --git a/media-sound/mpd/mpd-0.9.4.ebuild b/media-sound/mpd/mpd-0.9.4.ebuild index e0f5d0d7bbcc..3db68b7bf230 100644 --- a/media-sound/mpd/mpd-0.9.4.ebuild +++ b/media-sound/mpd/mpd-0.9.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.9.4.ebuild,v 1.3 2004/03/30 18:19:57 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.9.4.ebuild,v 1.4 2004/04/20 07:50:56 eradicator Exp $ IUSE="oggvorbis mad" @@ -39,16 +39,20 @@ src_install() { dodoc COPYING ChangeLog INSTALL README TODO UPGRADING dodoc doc/COMMANDS doc/mpdconf.example + insinto /etc + newins doc/mpdconf.example mpd.conf + exeinto /etc/init.d newexe ${FILESDIR}/mpd.rc6 mpd - insinto /etc/conf.d - newins ${FILESDIR}/mpd.conf mpd + + dosed 's:^port.*$:port "2100":' /etc/mpd.conf + dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf + dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf + dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf + dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf } pkg_postinst() { einfo "libao has issues with the ALSA drivers, please refer to the FAQ" einfo "http://musicpd.sourceforge.net/faq.php" - einfo - einfo " You need to set PORT, MUSIC_DIR, PLAYLIST_DIR," - einfo " LOG_FILE and ERROR_FILE in /etc/conf.d/mpd" } |