From 85160dac383b1052e1ac9197e6cd0efdb54e7c03 Mon Sep 17 00:00:00 2001 From: turmary Date: Sun, 27 Sep 2020 09:13:55 +0100 Subject: [PATCH] Remove: useless dd message in get_kernel_version() --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1d8370b..8c84be9 100755 --- a/install.sh +++ b/install.sh @@ -68,7 +68,7 @@ function get_kernel_version() { ZIMAGE=/boot/kernel.img [ -f /boot/firmware/vmlinuz ] && ZIMAGE=/boot/firmware/vmlinuz IMG_OFFSET=$(LC_ALL=C grep -abo $'\x1f\x8b\x08\x00' $ZIMAGE | head -n 1 | cut -d ':' -f 1) - _VER_RUN=$(dd if=$ZIMAGE obs=64K ibs=4 skip=$(( IMG_OFFSET / 4)) | zcat | grep -a -m1 "Linux version" | strings | awk '{ print $3; }') + _VER_RUN=$(dd if=$ZIMAGE obs=64K ibs=4 skip=$(( IMG_OFFSET / 4)) 2>/dev/null | zcat | grep -a -m1 "Linux version" | strings | awk '{ print $3; }') } echo "$_VER_RUN" return 0