1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

do not use sysctl -q as Nix may deploy of a version of sysctl that doesn't support this option, fixes #716

This commit is contained in:
Gregory Pakosz 2024-02-05 17:50:45 +01:00
parent fc4e3bc37b
commit 34fe183aa3

View file

@ -707,7 +707,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# _uptime() {
# case "$_uname_s" in
# *Darwin*|*FreeBSD*)
# boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }')
# boot=$(sysctl -n kern.boottime 2>/dev/null | awk -F'[ ,:]+' '{ print $4 }')
# now=$(date +%s)
# ;;
# *Linux*|*CYGWIN*|*MSYS*|*MINGW*)
@ -741,13 +741,13 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# _loadavg() {
# case "$_uname_s" in
# *Darwin*|*FreeBSD*)
# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)"
# tmux set -g @loadavg "$(sysctl -n vm.loadavg 2>/dev/null | cut -d' ' -f2)"
# ;;
# *Linux*|*CYGWIN*)
# tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)"
# ;;
# *OpenBSD*)
# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)"
# tmux set -g @loadavg "$(sysctl -n vm.loadavg 2>/dev/null | cut -d' ' -f1)"
# ;;
# esac
# }