mirror of https://github.com/digint/btrbk
ssh_filter_btrbk.sh: use printf instead of echo
In spirit, POSIX considers `echo` rather obsolete (it was just kept because of its widespread use). It’s also not possible to use `echo` portably unless it’s `-n`-option (as the first argument) and escape sequences are omitted. While neither was the case here, it’s better style to just always use `printf` in order to avoid any future confusion when both are used. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>pull/539/head
parent
ddc9b810de
commit
ee5a543e0b
|
@ -41,7 +41,7 @@ reject_and_die()
|
|||
{
|
||||
local reason="$1"
|
||||
log_cmd 'auth.err' 'btrbk REJECT' "$reason"
|
||||
echo "ERROR: ssh_filter_btrbk.sh: ssh command rejected: $reason: $SSH_ORIGINAL_COMMAND" 1>&2
|
||||
printf 'ERROR: ssh_filter_btrbk.sh: ssh command rejected: %s: %s\n' "$reason" "$SSH_ORIGINAL_COMMAND" 1>&2
|
||||
exit 255
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ while [ "$#" -ge 1 ]; do
|
|||
;;
|
||||
|
||||
*)
|
||||
echo "ERROR: ssh_filter_btrbk.sh: failed to parse command line option: $key" 1>&2
|
||||
printf 'ERROR: ssh_filter_btrbk.sh: failed to parse command line option: %s\n' "$key" 1>&2
|
||||
exit 255
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue