This file is indexed.

config is in bilibop-rules 0.4.20.

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
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/sh

set -e

# Source debconf library:
. /usr/share/debconf/confmodule

db_version 2.0
db_capb backup

# Get udev root path
. /lib/bilibop/common.sh
get_udev_root

# Do you intend to install this package on a live system ?
# Ask it only once, please...
db_fget bilibop-rules/on-live-system seen
if [ "${RET}" != "true" ]; then
    db_input critical bilibop-rules/on-live-system || true
    db_go || true
fi

# If this package is intended to be installed on a Live System,
# then skip other questions.
db_get bilibop-rules/on-live-system
if [ "${RET}" = "true" ]; then
    db_stop
    exit 0
fi

# make_unpersistent_rules
# -----------------------

if [ -d "/run/udev/rules.d" ]; then
    db_input high bilibop-rules/make_unpersistent_rules || true
    db_go || true
fi

# grub_device_map_manager
# -----------------------

if [ -d "/boot/grub" -a -x "/usr/sbin/grub-mkdevicemap" ]; then
    db_input high bilibop-rules/grub_device_map_manager || true
    db_go || true
fi

# bilibop_rules_generator
# -----------------------

# Next questions (in the loop) should have the same priority:
prio="low"
STATE=1
while true; do
    case "${STATE}" in
        0)
            # Don't go back:
            STATE=1
            continue
            ;;
        1)
            if [ -f /etc/udev/rules.d/66-bilibop.rules ]; then
                db_input ${prio} bilibop-rules/bilibop_rules_generator/overwrite || true
            else
                db_input ${prio} bilibop-rules/bilibop_rules_generator/customize || true
            fi
            ;;
        2)
            CUSTOM_RULES="false"
            if [ -f /etc/udev/rules.d/66-bilibop.rules ]; then
                db_get bilibop-rules/bilibop_rules_generator/overwrite
                if [ "${RET}" = "rebuild" ]; then
                    CUSTOM_RULES="true"
                    db_input ${prio} bilibop-rules/bilibop_rules_generator/options || true
                fi
            else
                db_get bilibop-rules/bilibop_rules_generator/customize
                if [ "${RET}" = "true" ]; then
                    CUSTOM_RULES="true"
                    db_input ${prio} bilibop-rules/bilibop_rules_generator/options || true
                fi
            fi
            ;;
        3)
            if [ "${CUSTOM_RULES}" = "true" ]; then
                db_get bilibop-rules/bilibop_rules_generator/options
                /usr/share/bilibop/bilibop_rules_generator -o ${udev_root}/null ${RET} 2>${udev_root}/null ||
                    db_input ${prio} bilibop-rules/bilibop_rules_generator/bad_options
            fi
            ;;
        *)
            break
            ;;
    esac

    if db_go; then
        STATE=$((STATE+1))
    else
        STATE=$((STATE-1))
    fi
done

# physical_volumes_filter
# -----------------------

if [ -h /proc/mounts -a -d /sys/block ]; then
    for blk in $(ls /sys/block | grep -Ev '^(loop|dm-)'); do
        if lsblk ${udev_root}/${blk} --noheadings -o mountpoint | grep -q '^/$'; then
            SYSTEM_DISK="${udev_root}/${blk}"
            break
        fi
    done

    if lsblk ${SYSTEM_DISK} --noheadings -o type,fstype | grep -Eq '\<(lvm|LVM2_member)\>'; then
        db_input low bilibop-rules/physical_volumes_filter/system-only || true
        db_go || true
    fi
fi

db_stop


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