Package: mpd
Version: 0.12.1-1
Severity: normal
Tags: patch

Hello,

since I use a tmpfs for my /var/run [1], mpd cannot start anymore,
because /var/run/mpd doesn't exist.  The following patch solves the
problem (similar to bug #390506 [2]):

--8<---------------cut here---------------start------------->8---
--- mpd.ORG     2007-01-28 19:07:41.000000000 +0100
+++ mpd 2007-01-28 19:11:17.000000000 +0100
@@ -12,11 +12,21 @@
 DAEMON=/usr/bin/mpd
 MPDCONF=/etc/mpd.conf
 START_MPD=true
+VARRUNDIR=/var/run/mpd
 
 if [ -r /etc/default/mpd ]; then
     . /etc/default/mpd
 fi
 
+check_varrundir () {
+    if [ ! -d $VARRUNDIRDIR ]; then
+        echo -n "Creating $VARRUNDIR..."
+        mkdir -m 0755 $VARRUNDIR
+        chown mpd:audio $VARRUNDIR
+        echo "done."
+    fi
+}
+
 check_conf () {
     if ! (grep -q db_file $MPDCONF && grep -q pid_file $MPDCONF); then
         echo "$MPDCONF must have db_file and pid_file set; not starting."
@@ -37,6 +47,7 @@
         echo "Not starting MPD: disabled by /etc/default/mpd."
         exit 0
     fi
+    check_varrundir
     echo -n "Starting Music Player Daemon: "
     check_conf
     check_dbfile
--8<---------------cut here---------------end--------------->8---

Please consider for inclusion, TIA.

Thx, bye,
Gismo / Luca

Footnotes: 
[1] http://lists.debian.org/debian-devel/2006/10/msg01277.html
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390506

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages mpd depends on:
ii  libao2               0.8.6-4             Cross Platform Audio Output Librar
ii  libasound2           1.0.13-1            ALSA library
ii  libaudiofile0        0.2.6-6             Open-source version of SGI's audio
ii  libc6                2.3.6.ds1-10        GNU C Library: Shared libraries
ii  libflac7             1.1.2-6             Free Lossless Audio Codec - runtim
ii  libid3tag0           0.15.1b-10          ID3 tag reading library from the M
ii  libmad0              0.15.1b-2.1         MPEG audio decoder library
ii  libmikmod2           3.1.11-a-6          A portable sound library
ii  libmpcdec3           1.2.2-1             Musepack (MPC) format library
ii  libogg0              1.1.3-2             Ogg Bitstream Library
ii  libshout3            2.2.2-1             MP3/Ogg Vorbis broadcast streaming
ii  libspeex1            1.1.12-3            The Speex Speech Codec
ii  libtheora0           0.0.0.alpha7.dfsg-2 The Theora Video Compression Codec
ii  libvorbis0a          1.1.2.dfsg-1.2      The Vorbis General Audio Compressi
ii  libvorbisenc2        1.1.2.dfsg-1.2      The Vorbis General Audio Compressi
ii  libvorbisfile3       1.1.2.dfsg-1.2      The Vorbis General Audio Compressi
ii  zlib1g               1:1.2.3-13          compression library - runtime

mpd recommends no packages.

-- no debconf information

Attachment: pgpIkEwloGhqx.pgp
Description: PGP signature

Reply via email to