Add memtest support.
[syslinux-debian/hramrach.git] / debian / syslinux-stuff.postinst
blob236a8888c57fbe5cf7e008e710f5d104ddf41519
1 #!/bin/sh
3 set -e
5 . /usr/share/debconf/confmodule
7 case "${1}" in
8 configure)
9 db_get extlinux/install
10 _INSTALL="${RET}" # boolean
12 db_stop
14 case "${_INSTALL}" in
15 true)
16 extlinux-update
18 _DEVICE=""
19 _PATH="/boot/extlinux"
21 while true
23 _DEVICE="$(findmnt --canonicalize --noheadings --output SOURCE --raw ${_PATH}/ | sed -r 's|[0-9]+$||;s|([0-9])p$|\1|')"
25 if [ -n "${_DEVICE}" ] || [ -z "${_PATH}" ]
26 then
27 break
30 _PATH="$(dirname ${_PATH})"
31 done
33 extlinux-install "${_DEVICE}"
37 if [ -x /etc/kernel/postinst.d/zz-extlinux ]
38 then
39 /etc/kernel/postinst.d/zz-extlinux
42 esac
45 abort-upgrade|abort-remove|abort-deconfigure)
50 echo "postinst called with unknown argument \`${1}'" >&2
51 exit 1
53 esac
55 #DEBHELPER#
57 exit 0