summaryrefslogtreecommitdiffstats
path: root/contrib/debian/openzfs-zfs-dkms.config
blob: ad7e160a2b114d97323571fe7967bd92d0500873 (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
30
31
#!/bin/sh

set -e

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

db_input critical zfs-dkms/note-incompatible-licenses || true
db_go

kernelbits=unknown
if [ -r /proc/kallsyms ]; then
	addrlen=$(head -1 /proc/kallsyms|awk '{print $1}'|wc -c)
	if [ $addrlen = 17 ]; then
		kernelbits=64
	elif [ $addrlen = 9 ]; then
		kernelbits=32
	fi
fi

if [ $kernelbits != 64 ]; then
	if [ $kernelbits = 32 ]; then
		db_input critical zfs-dkms/stop-build-for-32bit-kernel || true
		db_go || true
	else
		db_input critical zfs-dkms/stop-build-for-unknown-kernel || true
		db_go || true
	fi
fi

#DEBHELPER#