Conversation
This commit include using custom shuf() function based awk instead coreutils which doesnt ship by default on OpenBSD. Disk benchmark broke cause disklabel(8) require run as root to get partition table.
In openbsd there no -4 command line argument on ping(8) using ping to IPv4 and ping6 for IPv6
Trying fix regular size with rough-way. Use vmstat(8) instead get from dmesg and covert it to covertable size. All tested works on OpenBSD 7.0. Any cleaner possible soon.
casting mem_usage to int to prevent illegal character awk and fix error non-exist /proc/version on OpenBSD
|
Updated example results. And all looks good to me |
|
Referring to danipragustia@27d36af is_openbsd() {
if [ $(uname) = "OpenBSD" ]; then
return 0;
fi
return 1;
}Shouldn't this be. is_openbsd() {
if [ $(uname) = "OpenBSD" ]; then
return 0;
else
return 1;
fi
}
Just revisited this issues, your codes should be fine. Though I recommend to shorten it. is_openbsd() {
[ "$(uname)" = "OpenBSD" ] && return 0 || return 1
}Does the same thing and less line. |
|
All set! |
|
Thanks for taking the time to create a PR, I really appreciate it. I'll be sure to merge it 😃 Never used *BSD before, so I don't know the environment there— your PR really helps the development of this script. Again, thanks (Makasih ya gan he he 👍 ) |
@L1so mention ping will pick IPv4 when avaiable by default without specified with -4 and mem_info didn't require use any arithmetic expansion.
Thanks! |
This commit include using custom
shuf()function based awk instead coreutils which doesnt ship by default on OpenBSD. Disk benchmark broke cause disklabel(8) require run as root to get partition table.Fix list
convertsizeformatExample Results