From 967f332cecd4972f3064aed90e334ef3072072b1 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Mon, 15 Mar 2021 08:35:44 +0100 Subject: [PATCH] fixup: use arrays, reintroduce semicola --- tools/restart_network.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/restart_network.sh b/tools/restart_network.sh index abc72aa..b8b1a39 100644 --- a/tools/restart_network.sh +++ b/tools/restart_network.sh @@ -1,15 +1,15 @@ #!/bin/sh warning() { - printf "%s: Warning: %s\n" "$(basename $0)" "$*" 1>&2 + printf "%s: Warning: %s\n" "$(basename $0)" "${@}" 1>&2; } service_do() { - if systemctl $1 $2; then - return 0 + if systemctl "$1" "$2"; then + return 0; else - warning "Status $? on $*" - return 1 + warning "Status $? on" "${@}" + return 1; fi }