Redirect stderr for 'type' when checking for busctl or basuctl
existence. Initially only stdout was redirected to silence case when
'type' succeeds. However when 'type' fails to find something, it logs
that to stderr, this logging isn't required, since failures here are
expected and if both binaries are missing it'll be properly logged later
on.
---
makoctl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/makoctl b/makoctl
index 5b9d01a..c757991 100755
--- a/makoctl+++ b/makoctl
@@ -26,10 +26,10 @@ usage() {
}
BUSCTL=busctl
-if ! type $BUSCTL > /dev/null; then+if ! type $BUSCTL > /dev/null 2>&1; then BUSCTL=basuctl
fi
-if ! type $BUSCTL > /dev/null; then+if ! type $BUSCTL > /dev/null 2>&1; then echo >&2 "$0: busctl or basuctl is required"
exit 1
fi
--
2.26.2