Skip to content

Commit

Permalink
bootstrap: Support Linux setups without groups(1), whoami(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
sskras committed Apr 19, 2024
1 parent ede2764 commit 86fddba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bootstrap/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,13 @@ Linux)
need_awk=yes
need_sed=yes
fi
# Some distros, eg. OpenWRT provide no groups(1), whoami(1) by default:
if ! groups >/dev/null 2>&1; then
groupsprog="id -gn"
fi
if ! whoami >/dev/null 2>&1; then
whoamiprog="id -un"
fi
machine_arch=`uname -m`
# Override machine_arch where required.
case "$machine_arch" in
Expand Down

0 comments on commit 86fddba

Please sign in to comment.