mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 20:23:01 +02:00
board/common: shellcheck fixes to 'doas' sudo wrapper
Passing $@ to sudo requires quoting to prevent splitting arguments like
this:
admin@R2:~$ doas vtysh -c 'show ip ospf routes'
% Command incomplete: show
After this patch:
admin@R2:~$ doas vtysh -c 'show ip ospf route'
============ OSPF network routing table ============
N 192.168.50.0/24 [1] area: 0.0.0.0
directly attached to e7
============ OSPF router routing table =============
R 192.168.100.1 [1] area: 0.0.0.0, ASBR
via 192.168.50.1, e7
============ OSPF external routing table ===========
N E2 192.168.10.0/24 [1/20] tag: 0
via 192.168.50.1, e7
N E2 192.168.100.1/32 [1/20] tag: 0
via 192.168.50.1, e7
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
# Silly wrapper around sudo to prevent it from printing an error for
|
||||
# unprivileged users: sudo: a password is required
|
||||
|
||||
id -nG $LOGNAME | grep -qw wheel && sudo -n $@
|
||||
id -nG "$LOGNAME" | grep -qw wheel && sudo -n "$@"
|
||||
|
||||
Reference in New Issue
Block a user