Revert "Temporarily disable Direct IO by default"
[zfs.git] / contrib / debian / openzfs-zfs-dkms.postinst
blob0ecb9674d559b504203e1d8219b07c3f98e90a30
1 #!/bin/sh
2 set -e
4 # Source debconf library (see dh_installdebconf(1) and #106070 #626312)
5 . /usr/share/debconf/confmodule
7 kernelbits=unknown
8 if [ -r /proc/kallsyms ]; then
9 addrlen=$(head -1 /proc/kallsyms| grep -o '^ *[^ ]*' |wc -c)
10 if [ $addrlen = 17 ]; then
11 kernelbits=64
12 elif [ $addrlen = 9 ]; then
13 kernelbits=32
17 if [ $kernelbits != 64 ]; then
18 if [ $kernelbits = 32 ]; then
19 db_get zfs-dkms/stop-build-for-32bit-kernel
20 if [ "$RET" = "true" ]; then
21 echo "Ok, aborting, since ZFS is not designed for 32-bit kernels." 1>&2
22 # Exit 0: Tell dpkg that we finished OK but stop here.
23 # (don't build the module)
24 exit 0
25 else
26 echo "WARNING: Building ZFS module on a 32-bit kernel." 1>&2
28 else
29 db_get zfs-dkms/stop-build-for-unknown-kernel
30 if [ "$RET" = "true" ]; then
31 echo "Ok, aborting, since ZFS is not designed for 32-bit kernels." 1>&2
32 # Exit 0: (same that above)
33 exit 0
34 else
35 echo "WARNING: Building ZFS module on an unknown kernel." 1>&2
40 # Here the module gets built (automatically handled by dh_dkms)
42 #DEBHELPER#
45 case $1 in
46 (configure)
47 if [ -x /usr/share/update-notifier/notify-reboot-required ]; then
48 /usr/share/update-notifier/notify-reboot-required
51 esac