[Pkg-mpd-commits] [SCM] Git repository for pkg-mpd branch, master, updated. debian/0.16.1-1-15-g41660d7

Alexander Wirt formorer at debian.org
Sun Feb 20 21:10:22 UTC 2011


The following commit has been merged in the master branch:
commit 826af7b31c5479ee85c8a9052f0e439aeb817af6
Author: Alexander Wirt <formorer at debian.org>
Date:   Sun Feb 20 09:53:19 2011 +0100

    Warn if configfile contains the deprecated error_file option (Closes: #613736)

diff --git a/debian/mpd.postinst b/debian/mpd.postinst
index e8852ba..70577d8 100644
--- a/debian/mpd.postinst
+++ b/debian/mpd.postinst
@@ -35,15 +35,22 @@ do_mpd_conf () {
 }
 
 do_mpd_init () {
-    if [ -x /etc/init.d/mpd ]; then
-        # Start after ALSA/icecast/etc and stop before them
-        update-rc.d mpd defaults 30 14 >/dev/null
-        if [ -x /usr/sbin/invoke-rc.d ]; then
-            invoke-rc.d mpd "$@"
-        else
-            /etc/init.d/mpd "$@"
-        fi
-    fi
+		  if [ -x /etc/init.d/mpd ]; then
+					 # Start after ALSA/icecast/etc and stop before them
+					 update-rc.d mpd defaults 30 14 >/dev/null
+					 # check for a deprecated option
+					 if [ -f /etc/mpd.conf ] && grep -q '^\s*error_file\s*=' /etc/mpd.conf
+					 then
+								echo "Your configuration file contains the deprecated option error_file" 
+								echo "mpd won't start until you migrated your configuration"
+					 else
+								if [ -x /usr/sbin/invoke-rc.d ]; then
+										  invoke-rc.d mpd "$@"
+								else
+										  /etc/init.d/mpd "$@"
+								fi
+					 fi
+		  fi
 }
 
 do_mpd_restart () {

-- 
Git repository for pkg-mpd



More information about the Pkg-mpd-commits mailing list