Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix strings: fix compare and exports in Makefile #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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] " ; \
Expand All @@ -81,16 +81,16 @@ updateramfs:
else \
export updateramfs=1 ; \
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 \
Expand Down