From 82db8a5e356d747d2f2473ad65dfdda1d5d9d655 Mon Sep 17 00:00:00 2001 From: Gordon Tetlow Date: Tue, 14 Dec 2010 06:07:18 +0000 Subject: [PATCH] Move sysctl invocation to using a variable that's fully pathed. This prevents errors for users that don't have /sbin in their PATH. Submitted by: Max Boyarov Approved by: mentor (wes@ implicit) --- usr.bin/man/man.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 7b6b9288a664..7a5a221a50e0 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -535,10 +535,10 @@ man_setup() { MACHINE=${mflag##*:} fi if [ -z "$MACHINE_ARCH" ]; then - MACHINE_ARCH=$(sysctl -n hw.machine_arch) + MACHINE_ARCH=$($SYSCTL -n hw.machine_arch) fi if [ -z "$MACHINE" ]; then - MACHINE=$(sysctl -n hw.machine) + MACHINE=$($SYSCTL -n hw.machine) fi decho "Using architecture: $MACHINE_ARCH:$MACHINE" @@ -895,6 +895,7 @@ EQN=/usr/bin/eqn COL=/usr/bin/col NROFF='/usr/bin/groff -S -Wall -mtty-char -man' PIC=/usr/bin/pic +SYSCTL=/sbin/sysctl TBL=/usr/bin/tbl TROFF='/usr/bin/groff -S -man' REFER=/usr/bin/refer