]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Use single quotes for header text
authorJohannes Truschnigg <johannes@truschnigg.info>
Sat, 3 Sep 2022 14:09:38 +0000 (16:09 +0200)
committerJohannes Truschnigg <johannes@truschnigg.info>
Sat, 3 Sep 2022 14:09:38 +0000 (16:09 +0200)
sqm_lagthrottle_suggest_config.sh

index 1b91d01cf24f6f6a058db79dbefd1d8accdac196..5d5b9586304ee50036522b1fe5c9dbd3492825d1 100755 (executable)
@@ -56,7 +56,7 @@ POTENTIAL_PING_PEERS='1.1.1.1 8.8.8.8 a.root-servers.net b.root-servers.net c.ro
 
 set -u
 
-_h "sqm_lagthrottle configuration wizard - WELCOME"
+_h 'sqm_lagthrottle configuration wizard - WELCOME'
 printf 'This script will prompt you for a number of settings\n(recommending sensible defaults where thought possible)\nrequired for proper operation of sqm_lagthrottle.\n\nPlease take a few minutes to follow its instructions\nto make the most out of dynamically adjusting your\nbandwidth shaper.\n'
 echo "" >&2
 
@@ -65,7 +65,7 @@ echo "" >&2
 _goon
 
 
-_h "set SQM device (downstream/rx)"
+_h 'set SQM device (downstream/rx)'
 ifb_dev=$( (find /sys/devices/virtual/net/ -name ifb\* -print; echo sorry-no-dev-found) | head -n 1)
 if [ -e "${ifb_dev}" ]
 then
@@ -73,14 +73,14 @@ 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 RX 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
 
 if ! [ -f "${ifb_dev}"///statistics/tx_bytes ]
 then
-  printf 'FATAL: No SQM shaping network device could be identified at\n\t"%s"\n' "${ifb_dev}" >&2
+  printf 'FATAL: No SQM shaping (rx) network device could be identified at\n\t"%s"\n' "${ifb_dev}" >&2
   exit 1
 fi
 
@@ -107,7 +107,7 @@ stats_tx=/sys/class/net/"${iface_tx}"/statistics/tx_bytes
 printf '\nEffective RX interface: [%s] - TX interface: [%s]\n' "${iface_rx}" "${iface_tx}"
 _goon
 
-_h "set bandwidth limits"
+_h 'set bandwidth limits'
 printf 'Please key in the positive integer LOWER bound (=minimum) bandwidth in Kbps\nfor your downstream Internet connection that you want to shape to: ' >&2
 read bw_down_min
 echo "" >&2
@@ -124,7 +124,7 @@ fi
 printf 'Effective RX bandwidth range: [%d ... %d Kbps]\n\n' "${bw_down_min}" "${bw_down_max}"
 _goon
 
-_h "configure sqm_lagthrottle bias"
+_h 'configure sqm_lagthrottle bias'
 printf 'sqm_lagthrottle can be configured to prioritize bandwith over latency,\nor vice versa.\n\nIf you would prefer to keep configured target bandwidth high even in\nthe face of worsening latency/bufferbloat, please key in "bandwith" below.\n\nAll other inputs will lead to a preference for lower latency.\n\n\t'
 read bw_or_lat_bias
 if [ x${bw_or_lat_bias} = xbandwidth ]
@@ -136,7 +136,7 @@ fi
 printf 'Effective choice: [%s]\n\n' "${bw_or_lat_bias}"
 _goon
 
-_h "configure sqm_lagthrottle eagerness"
+_h 'configure sqm_lagthrottle eagerness'
 printf 'sqm_lagthrottle can be configured to be eager or more relaxed\nwhen making shaper adjustment decisions.\n\nWith eager mode, decisions to try to react meaningfully to changing\ncircumstances are taken more often.\n\nIn relaxed mode, the bandwidth limits will be adjusted less frequently,\nwhich MAY save some CPU time.\n\nKeying in "relaxed" below chooses that mode.\nAll other inputs will lead to eager operation.\n\n\t'
 read relaxed_or_eager
 if [ x${relaxed_or_eager} = xrelaxed ]
@@ -148,7 +148,7 @@ fi
 printf 'Effective choice: [%s]\n\n' "${relaxed_or_eager}"
 _goon
 
-_h "automatic ping peer selection"
+_h 'automatic ping peer selection'
 
 printf 'Now, we will ping potential ICMP ECHO peers for a few minutes,\nrecord stats, and determine the top four peer choices.\n\nPlease keep your Internet-directed traffic AT A MINIMUM while\nthis task is active!\n' >&2
 _goon
@@ -244,7 +244,7 @@ echo "" >&2
 printf 'Suggested configuration values saved to\n\t%s\n\n' "${cfgo}" >&2
 _goon 'Hit the [ENTER] to display full stats, or [CTRL]+[C] to exit.' >&2
 
-_h "Extended ping statistics (informational only)"
+_h 'Extended ping statistics (informational only)'
 cat "${sto}" >&2
 echo "" >&2
 printf 'In case you missed it the first time around:\nSuggested configuration values saved to\n\t%s\n\n' "${cfgo}" >&2