setup_checks.sh: add sudo to iw call#872
setup_checks.sh: add sudo to iw call#872niziak wants to merge 1 commit intoct-Open-Source:masterfrom
Conversation
|
Hi @niziak thanks for the PR! Can you explain why this call need to be made as root? On my machine I can run |
|
On my Debian 10 machine iw returns not found, sudo iw works. |
|
Yes. On Debian |
|
Interesting, thanks for the explanation! Since the actual problem is that it is missing from PATH, would it make sense to update the PATH env variable? This way we can minimize the need for escalated privileges. Happy to hear your thoughts. |
|
On my Debian 10 machines |
Yes, problem is in PATH variable. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATHPerhaps this workaround can be universal for everyone: $(whereis -b iw | awk '{print $2}') |
No description provided.