preinst is in mpd 0.19.12-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/sh
# don't fail if this doesn't work
#set -e
ACTION="$1"
VERSION="$2"
# transition away from START_MPD=false (obsolete after jessie)
if [ "$ACTION" = "upgrade" ]; then
[ -r /etc/default/mpd ] && . /etc/default/mpd
if grep -q START_MPD /etc/default/mpd && [ "x$START_MPD" != "xtrue" ]; then
touch /var/lib/mpd/NO_START
update-rc.d mpd disable > /dev/null
# attempt to reset /etc/default/mpd to unmodified state
sed -i -e's/^START_MPD=.*$/START_MPD=true/' /etc/default/mpd
fi
fi
|