Browse Source

Fix global explorers for NetBSD

On NetBSD sysctl is at /sbin/sysctl, but the default PATH does not
contain /sbin.
merge-requests/917/head
Dennis Camera 2 years ago
parent
commit
5dfc996feb
  1. 1
      cdist/conf/explorer/cpu_cores
  2. 5
      cdist/conf/explorer/disks
  3. 1
      cdist/conf/explorer/memory

1
cdist/conf/explorer/cpu_cores vendored

@ -33,6 +33,7 @@ case "$os" in
;;
"freebsd"|"netbsd")
PATH=$(getconf PATH)
sysctl -n hw.ncpu
;;

5
cdist/conf/explorer/disks vendored

@ -30,9 +30,8 @@ case $uname_s in
sysctl -n hw.disknames | grep -Eo '[lsw]d[0-9]+'
;;
NetBSD)
PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
sysctl -n hw.disknames \
| awk 'BEGIN { RS = " " } /^[lsw]d[0-9]+/'
PATH=$(getconf PATH)
sysctl -n hw.disknames | awk -v RS=' ' '/^[lsw]d[0-9]+/'
;;
Linux)
# list of major device numbers toexclude:

1
cdist/conf/explorer/memory vendored

@ -30,6 +30,7 @@ case "$os" in
;;
*"bsd")
PATH=$(getconf PATH)
echo "$(sysctl -n hw.physmem) / 1048576" | bc
;;

Loading…
Cancel
Save