File: postinst

package info (click to toggle)
pcmciautils 018-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 484 kB
  • sloc: ansic: 3,901; makefile: 224; lex: 222; sh: 169; yacc: 105; xml: 24
file content (25 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (6)
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
#! /bin/sh
set -e

# Insert debhelper fragments before calling 'update-rc.d pcmciautils
# remove', since that will fail if the init script has not yet been removed.

#DEBHELPER#

case $1 in
	configure)
        	if dpkg --compare-versions "$2" le 015-1+b100 &&
                        [ -h /etc/udev/rules.d/85-pcmcia.rules ]; then
                        rm /etc/udev/rules.d/85-pcmcia.rules
                fi

        	if dpkg --compare-versions "$2" le 015-1+b100; then
                	update-rc.d pcmciautils remove >/dev/null
                fi

		if [ ! -f /etc/pcmcia/config.opts ]; then
			[ -d /etc/pcmcia ] || mkdir /etc/pcmcia
			cp -a /usr/lib/pcmciautils/config.opts /etc/pcmcia/
		fi
                ;;
esac