From the website: Byobu is a GPLv3 open source text-based window manager and terminal multiplexer. It was originally designed to provide elegant enhancements to the otherwise functional, plain, practical GNU Screen, for the Ubuntu server distribution. Byobu now includes an enhanced profiles, convenient keybindings, configuration utilities, and toggle-able system status notifications for both the GNU Screen window manager and the more modern Tmux terminal multiplexer, and works on most Linux, BSD, and Mac distributions. Adapted from the old packages feed: https://git.openwrt.org/?p=openwrt/svn-archive/packages.git;a=tree;f=utils/byobu Signed-off-by: Jeffery To <jeffery.to@gmail.com>
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
--- 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
|