summaryrefslogtreecommitdiff
path: root/debian/initramfs-tools.preinst
blob: f2b667e42c016cc563250d340863999a48020e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

case "$1" in
	upgrade)
	if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then
		if [ -d /etc/initramfs-tools ]; then
			echo
			echo "Warning: /etc/initramfs-tools already exists."
			echo "         Please remove it for upgrade."
			echo
			exit 1
		fi
		if [ -d /etc/mkinitramfs ]; then
			mv /etc/mkinitramfs /etc/initramfs-tools
		fi
	fi
	;;
esac

#DEBHELPER#