mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/tools/tapsetup: make compatible with doas
`doas` doesn't set `SUDO_USER`, but `DOAS_USER`. This populates `SUDO_USER` with `DOAS_USER` if it is empty, so the script works with both doas and sudo.
This commit is contained in:
parent
251ea7f75a
commit
d05d33f636
4
dist/tools/tapsetup/tapsetup
vendored
4
dist/tools/tapsetup/tapsetup
vendored
@ -13,6 +13,10 @@ BRIDGE_ROUTES=""
|
|||||||
DEFAULT_PREFIX_LEN=128
|
DEFAULT_PREFIX_LEN=128
|
||||||
UPLINK=""
|
UPLINK=""
|
||||||
|
|
||||||
|
# doas uses the DOAS_USER variable instead of SUDO_USER. For compatibility with
|
||||||
|
# both, we populate SUDO_USER with DOAS_USER, if SUDO_USER is not existing.
|
||||||
|
: "${SUDO_USER:="$DOAS_USER"}"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: ${PROGRAM} [arguments]" >&2
|
echo "usage: ${PROGRAM} [arguments]" >&2
|
||||||
echo "" >&2
|
echo "" >&2
|
||||||
|
Loading…
Reference in New Issue
Block a user