This file is indexed.

postinst is in bilibop-udev 0.5.4.

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
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh

set -e

belongs_to_floppy_group() {
    stat -c %G ${1}* | grep -q '^floppy$'
}

case "${1}" in
    configure)
        . /lib/bilibop/common.sh
        get_udev_root

        # Be sure the needed virtual filesystems are mounted, and udev is
        # running; or do nothing:
        if [ -h /proc/mounts -a -d /sys/block -a -c ${udev_root}/null ] &&
            invoke-rc.d udev status >${udev_root}/null 2>&1 &&
            BILIBOP_DISK="$(physical_hard_disk /)" &&
            query_sysfs_attrs ${BILIBOP_DISK} | grep -Eq '^[[:blank:]]*SUBSYSTEMS=="(usb|firewire|memstick|mmc)"'; then

            # Trigger uevents for the disk hosting the root filesystem and its
            # partitions:
            udevadm trigger --sysname-match=${BILIBOP_DISK##*/}*
            udevadm settle

            # But it can happen that this doesn't work and new rules must be
            # explicitly loaded before triggering uevents:
            if belongs_to_floppy_group ${BILIBOP_DISK}; then
                udevadm control --reload-rules
                udevadm trigger --sysname-match=${BILIBOP_DISK##*/}*
                udevadm settle

                if belongs_to_floppy_group ${BILIBOP_DISK}; then
                    [ -f /etc/udev/rules.d/66-bilibop.rules ] || exit 2
                fi
            fi
        fi
        ;;
esac


:
# vim: et ts=4 sts=4 sw=4