[Pkg-mpd-maintainers] Bug#775695: mpd: init.d/mpd checks variable DB_FILE always
Leandro Noferini
lnoferin at cybervalley.org
Sun Jan 18 19:09:00 UTC 2015
Package: mpd
Version: 0.19.1-1.1
Severity: normal
Tags: d-i
Dear Maintainer,
the /etc/init.d/mpd script checks the existence of DB_FILE variable but from
this version of mpd is possible to use it with a db on another mpd server: see
http://www.musicpd.org/doc/user/advanced_config.html
Attached there is a version of the script little changed to not check the
variable.
-- System Information:
Debian Release: 7.6
Architecture: armhf (armv6l)
Kernel: Linux 3.12.35+ (PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages mpd depends on:
ii adduser 3.113+nmu3
ii init-system-helpers 1.18~bpo70+1
ii libadplug-2.2.1-0 2.2.1+dfsg3-0.1
ii libao4 1.1.0-2
ii libasound2 1.0.25-4
ii libaudiofile1 0.3.6-2
ii libavahi-client3 0.6.31-2
ii libavahi-common3 0.6.31-2
ii libavcodec-extra-56 6:11.1-1+rpi1
ii libavformat56 6:11.1-1+rpi1
ii libavutil54 6:11.1-1+rpi1
ii libbz2-1.0 1.0.6-4
ii libc6 2.19-13
ii libcdio-cdda1 0.83-4+b1
ii libcdio-paranoia1 0.83-4+b1
ii libcdio13 0.83-4+b1
ii libcurl3-gnutls 7.26.0-1+wheezy12
ii libdbus-1-3 1.6.8-1+deb7u5
ii libexpat1 2.1.0-1+deb7u1
ii libfaad2 2.7-8
ii libflac8 1.3.0-3
ii libfluidsynth1 1.1.5-2
ii libgcc1 1:4.8.2-21~rpi3rpi1
ii libglib2.0-0 2.40.0-3rpi3rpi1
ii libgme0 0.5.5-2
ii libicu52 52.1-6
ii libid3tag0 0.15.1b-10
ii libiso9660-8 0.83-4+b1
ii libjack0 [libjack-0.116] 1:0.121.3+20120418git75e3e20b-2.1
ii libmad0 0.15.1b-7
ii libmikmod3 3.3.7-1
ii libmms0 0.6.2-3+deb7u1
ii libmodplug1 1:0.8.8.4-3+deb7u1+git20130828
ii libmp3lame0 3.99.5+repack1-3
ii libmpcdec6 2:0.1~r459-4
ii libmpdclient2 2.9-1
ii libmpg123-0 1.14.4-1
ii libnfs4 1.9.5-2
ii libogg0 1.3.0-4
ii libopenal1 1:1.14-4
ii libopus0 1.1-2
ii libpulse0 2.0-6.1
ii libresid-builder0c2a 2.1.1-14
ii libroar2 1.0~beta2-3
ii libsamplerate0 0.1.8-5
ii libshout3 2.2.2-8
ii libsidplay2 2.1.1-14
ii libsidutils0 2.1.1-14
ii libsmbclient 2:4.1.13+dfsg-2
ii libsndfile1 1.0.25-5
ii libsoxr0 0.1.1-1
ii libsqlite3-0 3.7.13-1+deb7u1
ii libstdc++6 4.9.1-19
ii libsystemd0 215-8
ii libupnp6 1:1.6.17-1.2
ii libvorbis0a 1.3.2-1.3
ii libvorbisenc2 1.3.2-1.3
ii libvorbisfile3 1.3.2-1.3
ii libwavpack1 4.60.1-3
ii libwildmidi1 0.2.3.4-2.1
ii libwrap0 7.6.q-24
ii libyajl2 2.0.4-2
ii libzzip-0-13 0.13.56-1.1
ii lsb-base 4.1+Debian8+rpi1+deb7u1
ii zlib1g 1:1.2.7.dfsg-13
mpd recommends no packages.
Versions of packages mpd suggests:
ii avahi-daemon 0.6.31-4
pn icecast2 <none>
ii mpc [mpd-client] 0.26-1
pn pulseaudio <none>
-- Configuration Files:
/etc/init.d/mpd changed:
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mpd
DESC="Music Player Daemon"
DAEMON=/usr/bin/mpd
MPDCONF=/etc/mpd.conf
[ -x "$DAEMON" ] || exit 0
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
if [ -n "$MPD_DEBUG" ]; then
set -x
MPD_OPTS=--verbose
fi
PIDFILE=$(sed -n 's/^[[:space:]]*pid_file[[:space:]]*"\?\([^"]*\)\"\?/\1/p' $MPDCONF)
mpd_start () {
log_daemon_msg "Starting $DESC" "$NAME"
if [ -z "$PIDFILE" ]; then
log_failure_msg \
"$MPDCONF must have pid_file set; cannot start daemon."
exit 1
fi
PIDDIR=$(dirname "$PIDFILE")
if [ ! -d "$PIDDIR" ]; then
mkdir -m 0755 $PIDDIR
if dpkg-statoverride --list --quiet /run/mpd > /dev/null; then
# if dpkg-statoverride is used update it with permissions there
dpkg-statoverride --force --quiet --update --add $( dpkg-statoverride --list --quiet /run/mpd ) 2> /dev/null
else
# use defaults
chown mpd:audio $PIDDIR
fi
fi
start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" \
--exec "$DAEMON" -- $MPD_OPTS "$MPDCONF"
log_end_msg $?
}
mpd_stop () {
if [ -z "$PIDFILE" ]; then
log_failure_msg \
"$MPDCONF must have pid_file set; cannot stop daemon."
exit 1
fi
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile "$PIDFILE" \
--exec $DAEMON
log_end_msg $?
}
case "$1" in
start)
mpd_start
;;
stop)
mpd_stop
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME
;;
restart|force-reload)
mpd_stop
mpd_start
;;
force-start)
mpd_start
;;
force-restart)
mpd_stop
mpd_start
;;
force-reload)
mpd_stop
mpd_start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 2
;;
esac
/etc/mpd.conf changed:
music_directory "nfs://nasone/dati/Musica/"
playlist_directory "/var/lib/mpd/playlists"
log_file "syslog"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
user "mpd"
bind_to_address "any"
zeroconf_name "Biglia"
database {
plugin "proxy"
host "pinolino"
port "6600"
}
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
}
filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"
-- no debconf information
More information about the Pkg-mpd-maintainers
mailing list