From f44ca91b15e46f2f585daff1717ed90a7c75b89b Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 3 May 2018 10:57:48 +0200 Subject: [PATCH] Makefile: ignore error command if nft is not found And while at it, since "command" was using the absolute path to cover the case of /usr/sbin not being in PATH, we might as well use "test -x" directly. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c26fe1..9436a66 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: deploy-workstation: - command -v /usr/sbin/nft > /dev/null && sudo nft flush ruleset + -[ -x /usr/sbin/nft ] && sudo nft flush ruleset sudo ./iptables-workstation.sh sudo iptables-save > iptables sudo ip6tables-save > ip6tables -- 2.1.4