File: preinst

package info (click to toggle)
toshutils 2.0.1%2Bdebian-24
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,060 kB
  • ctags: 867
  • sloc: ansic: 7,379; sh: 1,537; yacc: 414; makefile: 290; lex: 84
file content (18 lines) | stat: -rw-r--r-- 458 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh 
set -e

if [ "$1" = install ] || [ "$1" = upgrade ]; then
	if dpkg --compare-versions "$2" lt-nl '2.0.1-20'; then
		rm -f /etc/modutils/toshutils
	fi
	
	if [ -e "/etc/modprobe.d/toshutils" ]; then
		if [ "`md5sum \"/etc/modprobe.d/toshutils\" | sed -e \"s/ .*//\"`" = \
			"`dpkg-query -W -f='${Conffiles}' toshutils | sed -n -e \"\\\\' /etc/modprobe.d/toshutils's/.* //p\"`" ]
		then
			rm -f "/etc/modprobe.d/toshutils"
		fi
	fi
fi

#DEBHELPER#