Skip to content

Commit 86fddba

Browse files
committed
bootstrap: Support Linux setups without groups(1), whoami(1)
1 parent ede2764 commit 86fddba

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎bootstrap/bootstrap‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,13 @@ Linux)
749749
need_awk=yes
750750
need_sed=yes
751751
fi
752+
# Some distros, eg. OpenWRT provide no groups(1), whoami(1) by default:
753+
if ! groups >/dev/null 2>&1; then
754+
groupsprog="id -gn"
755+
fi
756+
if ! whoami >/dev/null 2>&1; then
757+
whoamiprog="id -un"
758+
fi
752759
machine_arch=`uname -m`
753760
# Override machine_arch where required.
754761
case "$machine_arch" in

0 commit comments

Comments
 (0)