From 9e43821e1741e2800df00f71ced0569629b032ab Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 4 Oct 2018 09:36:38 +0200 Subject: [PATCH] dispatcher: fix shellcheck warnings Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. And likewise, prefer [ p ] || [ q ] over [ p -o q ]. https://github.com/koalaman/shellcheck/wiki/SC2166 --- examples/dispatcher/10-ifcfg-rh-routes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dispatcher/10-ifcfg-rh-routes.sh b/examples/dispatcher/10-ifcfg-rh-routes.sh index 147506e47..d72400aed 100755 --- a/examples/dispatcher/10-ifcfg-rh-routes.sh +++ b/examples/dispatcher/10-ifcfg-rh-routes.sh @@ -45,7 +45,7 @@ handle_ip_file() { } -if [ "$2" != "pre-up" -a "$2" != "down" ]; then +if [ "$2" != "pre-up" ] && [ "$2" != "down" ]; then exit 0 fi @@ -59,7 +59,7 @@ if [ -z "$profile" ]; then exit 0 fi -if ! [ -f "$dir/rule-$profile" -o -f "$dir/rule6-$profile" ]; then +if [ ! -f "$dir/rule-$profile" ] && [ ! -f "$dir/rule6-$profile" ]; then exit 0 fi