Skip to content

Fixes for Hauku OS, tested on Haiku build hrev59000 and higher. #818

Description

@MSabino85

Fixes for Hauku OS, tested on Haiku build hrev59000 and higher.

Adapted uptime
Fixed GPU to take only the one containing "VGA" in listdev description
Added Haiku specific block in detectdisk() funcon
Adapted RAN memory detection in Haiku block

1379c1379
< uptime=$(uptime | sed 's/.*up //; s/, [0-9] user.//')

          uptime=$(uptime | "${AWK}" -F', up ' '{gsub(/ *hours?,/, "h"); gsub(/ *minutes?/, "m"); print $2;}')

1696c1696
< gpu="$(listdev | grep -A2 -e 'device Display controller (VGA' | "${AWK}" -F': ' '/^ +device/ {print $2}')"

          gpu="$(listdev | grep -A2 -e 'device Display controller' | "${AWK}" -F': ' '/^ +device/ {print $2}')"

1793,1802d1792
<
< if [[ "$distro" == "Haiku" ]]; then
< df_output=$(df -h | head -n 3 | tail -n 1)
< diskused=$(echo "$df_output" | awk '{print $4}')
< disktotal=$(echo "$df_output" | awk '{print $2}')
< diskusedper=$(echo "$df_output" | awk '{print $5}')
< diskusage="$diskused / $disktotal ($diskusedper)"
< return
< fi
<
1885,1887c1875,1876
< totalmem=$(sysinfo -mem | awk 'NR == 1 {gsub(/[()/]/, ""); printf("%d", $6/(10241024))}')
< usedmem=$(sysinfo -mem | awk 'NR == 1 {gsub(/[()/]/, ""); printf("%d", $5/(1024
1024))}')
< mem="$usedmem""MiB / ""$totalmem""MiB"

          totalmem=$(sysinfo -mem | "${AWK}" 'NR == 1 {gsub(/[\(\)\/]/, ""); printf("%d", $6/1024**2)}')
          usedmem=$(sysinfo -mem | "${AWK}" 'NR == 1 {gsub(/[\(\)\/]/, ""); printf("%d", $5/1024**2)}')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions