summaryrefslogtreecommitdiff
path: root/bootadm/debian/bootadm.postinst
blob: 978a43318089d4af552203f7bc686ff79e9aba93 (plain)
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
#!/bin/sh

set -e

trigger_boot_archive() {
    if [ -z "$DEB_BOOTADM_DISABLE_UPDATE_ARCHIVE" ]; then
        /sbin/bootadm update-archive
    else
        echo "Skipping boot archive update (DEB_BOOTADM_DISABLE_UPDATE_ARCHIVE is set). " >&2
    fi
}

case "$1" in
    configure)
    ;;

    triggered)
        trigger_boot_archive
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac