File: preinst

package info (click to toggle)
mt-daapd 0.9~r1696.dfsg-6lenny3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,960 kB
  • ctags: 3,220
  • sloc: ansic: 25,552; sh: 9,055; perl: 454; xml: 339; makefile: 225
file content (26 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -e

#DEBHELPER#

# Upgrade...
case "$1" in
upgrade)
	if dpkg --compare-versions "$2" lt '0.9~r1586-1'; then
		# Update init script priority, #420996
		# We can't use update-rc.d. Why not?
		for i in 0 1 6; do
			if [ -e "/etc/rc${i}.d/K20mt-daapd" ]; then
				mv -f /etc/rc${i}.d/K20mt-daapd /etc/rc${i}.d/K25mt-daapd
			fi
		done

		for i in 2 3 4 5; do
			if [ -e "/etc/rc${i}.d/S20mt-daapd" ]; then
				mv -f /etc/rc${i}.d/S20mt-daapd /etc/rc${i}.d/S25mt-daapd
			fi
		done
	fi
;;
esac