From: Johannes Truschnigg Date: Sat, 3 Sep 2022 13:45:31 +0000 (+0200) Subject: Config wizard enhancements X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=10d146cdd61e0ca80a431e6fa9667894b87f42ca;p=sqm_lagthrottle Config wizard enhancements --- diff --git a/sqm_lagthrottle_suggest_config.sh b/sqm_lagthrottle_suggest_config.sh index c323941..e61c97f 100755 --- a/sqm_lagthrottle_suggest_config.sh +++ b/sqm_lagthrottle_suggest_config.sh @@ -63,7 +63,7 @@ then printf 'Please confirm this by supplying either this device path again,\nor a custom value to replace it:\n\t' >&2 read ifb_dev else - printf 'FATAL: No SQM shaping network device could be determined.\nAre you sure SQM has been set up via luci-app-sqm?\n' >&2 + printf 'FATAL: No SQM shaping RX network device could be determined.\nAre you sure SQM has been set up via luci-app-sqm?\n' >&2 exit 1 fi echo "" >&2 @@ -81,6 +81,7 @@ iface_tx="${iface_rx/ifb4/}" if [ -e /sys/class/net/"${iface_tx}" ] then printf 'Auto-detected dependent upstream (tx) device:\n\t%s\n\n' "${iface_tx}" >&2 + printf 'Possible choices:\n\t%s\n\n' "$(cd /sys/class/net/; echo *)" printf 'Please confirm this by supplying either this interface name again,\nor a custom value to replace it:\n\t' >&2 else printf 'Failed to auto-detect a suitable upstream/tx interface.\nPlease supply a valid sysfs device path to it.\n\t' >&2 @@ -89,10 +90,11 @@ read iface_tx if ! [ -f /sys/class/net/"${iface_tx}"///statistics/rx_bytes ] then - printf 'FATAL: No suitable network device could be identified at\n\t"%s"\n' "/sys/class/net/${iface_tx}" >&2 + printf 'FATAL: No suitable TX network device could be identified at\n\t"%s"\n' "/sys/class/net/${iface_tx}" >&2 exit 1 fi stats_tx=/sys/class/net/"${iface_tx}"/statistics/rx_bytes +printf '\nEffective RX interface: [%s] - TX interface: [%s]\n' "${iface_rx}" "${iface_tx}" _goon _h "set bandwidth limits" @@ -109,6 +111,7 @@ then printf 'FATAL: Maximum shaping bandwith must be greater than the minimum.\n' exit 1 fi +printf 'Effective RX bandwidth range: [%d ... %d Kbps]\n\n' "${bw_down_min}" "${bw_down_max}" _goon _h "configure sqm_lagthrottle bias"