Fix the baraction.sh example script to display current statistics from

iostat(8).

ok gonzalo@
This commit is contained in:
mglocker 2021-01-24 15:41:37 +00:00
parent 340848b7b5
commit 16175dbe58
2 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.36 2021/01/23 18:34:17 bket Exp $
# $OpenBSD: Makefile,v 1.37 2021/01/24 15:41:37 mglocker Exp $
COMMENT= small tiling window manager
@ -8,7 +8,7 @@ GH_PROJECT= spectrwm
GH_TAGNAME= SPECTRWM_${V:S/./_/g}
DISTNAME= ${GH_PROJECT}-${V}
REVISION= 0
REVISION= 1
SHARED_LIBS= swmhack 1.0

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-baraction_sh,v 1.1 2021/01/24 15:41:38 mglocker Exp $
Index: baraction.sh
--- baraction.sh.orig
+++ baraction.sh
@@ -84,7 +84,7 @@ print_bat() {
APM_DATA=""
I=0
while :; do
- IOSTAT_DATA=`/usr/sbin/iostat -C | grep '[0-9]$'`
+ IOSTAT_DATA=`/usr/sbin/iostat -C -c 2 | tail -n 1 | grep '[0-9]$'`
if [ $I -eq 0 ]; then
APM_DATA=`/usr/sbin/apm -alb`
fi