This file is indexed.

postinst is in prism2-usb-firmware-installer 0.2.9+dfsg-5.

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
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh -e

UPSTREAM='http://git.shaftnet.org/git/gitweb.cgi?p=linux-wlan-ng.git;a=blob_plain;f=src/prism2/ru010803.hex;hb=HEAD'
HEXFILE=/lib/firmware/ru010803.hex
FWFILE=/lib/firmware/ru010803.fw

checkfile () {
	md5sum --check <<- EOMD5SUM
	3eba76f7e3a10d64071b1822a229f49e  $HEXFILE
	EOMD5SUM
}

# Fetch firmware if needed
if [ ! -s $HEXFILE ] || ! checkfile ; then
	rm -f $HEXFILE
	wget -O $HEXFILE $UPSTREAM || cat <<- EOMSG 1>&2

		Warning: Failed to download firmware for prism2-usb.
		Please run "dpkg-reconfigure prism2-usb-firmware-installer"
		again when networking is up, or copy the firmware manually
		to $HEXFILE
		and rerun the command to convert the firmware.

	EOMSG
fi

# Convert from SREC format (.hex) to kernel (.fw)
if [ -s $HEXFILE ] && checkfile ; then
	echo Converting firmware file
	/usr/bin/srec2fw $HEXFILE $FWFILE
fi