From b3c9d8b7ae0f0bd0c1a74551df29208776be327e Mon Sep 17 00:00:00 2001 From: camielverdult <69303460+camielverdult@users.noreply.github.com> Date: Mon, 12 Oct 2020 15:16:12 +0200 Subject: [PATCH] Fix strings: fix compare and exports in Makefile --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 54ae42a..b6d529b 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,9 @@ else TARGET := atlantic -export DEBIAN=`/usr/bin/dpkg --search /usr/bin/dpkg >/dev/null 2>&1 && echo 1 || echo 0` +export DEBIAN="/usr/bin/dpkg --search /usr/bin/dpkg >/dev/null 2>&1 && echo 1 || echo 0" -export KO_EXISTS=`cat /etc/modules 2>/dev/null | grep atlantic && echo 1 || echo 0` +export KO_EXISTS="cat /etc/modules 2>/dev/null | grep atlantic && echo 1 || echo 0" ifndef KDIR BUILD_DIR:=/lib/modules/$(shell uname -r)/build @@ -64,12 +64,12 @@ updateramfs: lsinitrd|grep ${TARGET}.ko >/dev/null 2>&1 ; \ export grep_result=$$? ;\ fi ; \ - if [ $$grep_result -eq 0 ]; then \ + if [ "$$grep_result" -eq 0 ]; then \ export inramfs=1 ; \ else \ export inramfs=0 ; \ fi ; \ - if [ $$inramfs -eq 1 ]; then \ + if [ "$$inramfs" -eq 1 ]; then \ echo "${TARGET}.ko is in initramfs." ; \ echo "CAUTION! Updating initramfs is potentially dangerous." ; \ echo -n "Attempt initramfs update? [yN] " ; \ @@ -79,16 +79,16 @@ updateramfs: *) export updateramfs=0; break;; \ esac ; \ fi ; \ - if [ $$updateramfs -eq 1 -a "${DEBIAN}" = "1" ]; then \ + if [ "$$updateramfs" -eq 1 -a "${DEBIAN}" = "1" ]; then \ update-initramfs -u ; \ if [ "${KO_EXISTS}" = "0" ]; then echo atlantic >> /etc/modules ; fi; \ - elif [ $$updateramfs -eq 1 ]; then \ + elif [ "$$updateramfs -eq" 1 ]; then \ dracut --force ; \ fi uninstall: @modprobe -r -n --first-time ${TARGET} >/dev/null 2>&1 ; \ - if [ $$? -eq 0 ]; then \ + if [ "$$?" -eq 0 ]; then \ echo -n "The driver is in use. Uninstall will stop the traffic! Continue? [yN] " ; \ read yn ; \ case $$yn in \