Control: tag -1 patch

The most widespread symptom can be fixed with a little bit of
grep hackery (patch attached). This fixes the "some/all lines
starting with ' *(null)'" case, though I haven't tested this
on any 32-bit machines (I don't have any).
commit e56332bf68aa71e22e13f7294f7587a202c7b68a
Author: Antonio Russo <antonio.e.ru...@gmail.com>
Date:   Fri Mar 2 17:05:22 2018 -0500

    Handle /proc/kallsym obfuscation

diff --git a/debian/zfs-dkms.postinst b/debian/zfs-dkms.postinst
index cb87e1ce..0ecb9674 100644
--- a/debian/zfs-dkms.postinst
+++ b/debian/zfs-dkms.postinst
@@ -6,7 +6,7 @@ set -e
 
 kernelbits=unknown
 if [ -r /proc/kallsyms ]; then
-	addrlen=$(head -1 /proc/kallsyms|awk '{print $1}'|wc -c)
+	addrlen=$(head -1 /proc/kallsyms| grep -o '^ *[^ ]*' |wc -c)
 	if [ $addrlen = 17 ]; then
 		kernelbits=64
 	elif [ $addrlen = 9 ]; then

Reply via email to