|
--- a/usr/lib/byobu/disk
|
|
+++ b/usr/lib/byobu/disk
|
|
@@ -26,7 +26,10 @@ __disk_detail() {
|
|
__disk() {
|
|
local out="" MP="" size="" pct="" unit=""
|
|
# Default to /, but let users override
|
|
- [ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
|
|
+ MP="$MONITORED_DISK"
|
|
+ [ -n "$MP" ] || {
|
|
+ grep -q ' /overlay ' /proc/mounts && MP=/overlay || MP=/
|
|
+ }
|
|
case $MP in
|
|
/dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
|
|
esac
|
|
--- a/usr/lib/byobu/disk_io
|
|
+++ b/usr/lib/byobu/disk_io
|
|
@@ -42,7 +42,10 @@ getdisk() {
|
|
__disk_io() {
|
|
local part= i=
|
|
# Default to disk providing /, but let users override with MONITORED_DISK
|
|
- [ -z "$MONITORED_DISK" ] && mount_point="/" || mount_point="$MONITORED_DISK"
|
|
+ local mount_point="$MONITORED_DISK"
|
|
+ [ -n "$mount_point" ] || {
|
|
+ grep -q ' /overlay ' /proc/mounts && mount_point=/overlay || mount_point=/
|
|
+ }
|
|
# By default, we won't bug the user with the display of network traffic
|
|
# below DISK_IO_THRESHOLD in kB/s; override in $BYOBU_CONFIG_DIR/status
|
|
[ -n "$DISK_IO_THRESHOLD" ] || DISK_IO_THRESHOLD=50
|