You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.4 KiB

  1. --- a/usr/lib/byobu/disk
  2. +++ b/usr/lib/byobu/disk
  3. @@ -26,7 +26,10 @@ __disk_detail() {
  4. __disk() {
  5. local out="" MP="" size="" pct="" unit=""
  6. # Default to /, but let users override
  7. - [ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
  8. + MP="$MONITORED_DISK"
  9. + [ -n "$MP" ] || {
  10. + grep -q ' /overlay ' /proc/mounts && MP=/overlay || MP=/
  11. + }
  12. case $MP in
  13. /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
  14. esac
  15. --- a/usr/lib/byobu/disk_io
  16. +++ b/usr/lib/byobu/disk_io
  17. @@ -42,7 +42,10 @@ getdisk() {
  18. __disk_io() {
  19. local part= i=
  20. # Default to disk providing /, but let users override with MONITORED_DISK
  21. - [ -z "$MONITORED_DISK" ] && mount_point="/" || mount_point="$MONITORED_DISK"
  22. + local mount_point="$MONITORED_DISK"
  23. + [ -n "$mount_point" ] || {
  24. + grep -q ' /overlay ' /proc/mounts && mount_point=/overlay || mount_point=/
  25. + }
  26. # By default, we won't bug the user with the display of network traffic
  27. # below DISK_IO_THRESHOLD in kB/s; override in $BYOBU_CONFIG_DIR/status
  28. [ -n "$DISK_IO_THRESHOLD" ] || DISK_IO_THRESHOLD=50
  29. --- a/usr/share/byobu/status/statusrc
  30. +++ b/usr/share/byobu/status/statusrc
  31. @@ -36,8 +36,8 @@
  32. # and your lsb_release is "precise", only "p" will be displayed
  33. #RELEASE_ABBREVIATED=1
  34. -# Default: /
  35. -#MONITORED_DISK=/
  36. +# Default: /overlay
  37. +#MONITORED_DISK=/overlay
  38. # Minimum disk throughput that triggers the notification (in kB/s)
  39. # Default: 50