Commit 495a9fef authored by Muhammad Herdiansyah's avatar Muhammad Herdiansyah

Disk [OpenBSD]: Detect df version through usual df check instead of making a special if uname check

parent 2c4fb881
...@@ -3076,6 +3076,7 @@ get_disk() { ...@@ -3076,6 +3076,7 @@ get_disk() {
case "$df_version" in case "$df_version" in
*"IMitv"*) df_flags=(-P -g) ;; # AIX *"IMitv"*) df_flags=(-P -g) ;; # AIX
*"befhikm"*) df_flags=(-P -k) ;; # IRIX *"befhikm"*) df_flags=(-P -k) ;; # IRIX
*"hiklnP"*) df_flags=(-h) ;; # OpenBSD
*"Tracker"*) # Haiku *"Tracker"*) # Haiku
err "Your version of df cannot be used due to the non-standard flags" err "Your version of df cannot be used due to the non-standard flags"
...@@ -3090,7 +3091,6 @@ get_disk() { ...@@ -3090,7 +3091,6 @@ get_disk() {
if [[ "$uname" == "OpenBSD" ]]; then if [[ "$uname" == "OpenBSD" ]]; then
# On OpenBSD you can't use df against a /dev/... unless being root or # On OpenBSD you can't use df against a /dev/... unless being root or
# in the 'operator' group. Making a separate disks array creation. # in the 'operator' group. Making a separate disks array creation.
df_flags=(-h)
# building an AWK regexp # building an AWK regexp
disk_re="${disk_show[*]:-/}" disk_re="${disk_show[*]:-/}"
disk_re="${disk_re// /\|}" disk_re="${disk_re// /\|}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment