lynxthecat / cake-autorate

Eliminate the excess latency and jitter terrorizing your 4G, 5G, LTE, Starlink or other variable rate connection!
https://www.bufferbloat.net
GNU General Public License v2.0
287 stars 24 forks source link

For easier/more testing... #19

Closed richb-hanover closed 2 years ago

richb-hanover commented 2 years ago

CAKE-autorate.sh seems good enough for people to test. A couple thoughts for making it easier for people to try it:

#! /bin/bash
# Basic installation script for CAKE-autorate.sh
# See https://github.com/lynxthecat/sqm-autorate for details

# Retrieve required packages
opkg update
opkg install bash iputils-ping coreutils-sleep

# Set up CAKE-autorate files

# cd to the /root directory
cd /root/

# create the CAKE-autorate directory if it's not present
[ -d CAKE-autorate ] || mkdir CAKE-autorate

# cd into it
cd CAKE-autorate/
rm *

SRC_DIR="https://raw.githubusercontent.com/lynxthecat/CAKE-autorate/main/"
wget $SRC_DIR"CAKE-autorate.sh"
wget $SRC_DIR"config.sh"

chmod +x *.sh

echo " "
echo "Now edit the config.sh file" 
echo " "
echo "Then start the software with 'bash ./CAKE-autorate.sh'"
lynxthecat commented 2 years ago

Thanks. Yes I was planning to put this into main. Would you have tips for doing so? My 'main' branch has generated a lot of interest I believe from what GitHub tells me, so I need to be careful to keep that in tact for those who use it.

Could I simply rename 'CAKE-autorate' to 'main' and then rename 'main' to something like 'CAKE-autorate light', or should I merge? I am also not sure what to do with the other versions in the different branches.

How can I best keep 'main' and the others in tact?

@moeller0 any thoughts in this respect?

moeller0 commented 2 years ago

I am no expert on these matters, but as long as you keep branches (so not delete them) moving stuff from one branch to the next should be acceptable, just make a notice on the front page about delegating current "main" to "historic_main" (or what ever you call it) and moving CAKE-autorate to the front/main.

# Retrieve required packages
opkg update 
opkg install bash

Here I would use something like:

# Retrieve required packages
# Uncomment the next two lines to update the opkg pakage list and install bash
# make sure you have enough space available
 #opkg update 
# pkg install bash

for the simple reason that this has side-effects that can cause issues on routers tight on storage/memory so users should consciously perform that operation, no?

richb-hanover commented 2 years ago

@moeller0 - good points.

But bash seems to be required (I couldn't just use sh ./CAKE-autorate.sh - I don't know why).

Perhaps an investigation into the reason for these error messages when using sh ... could remove the requirement to install bash entirely... (I know there are a few differences between the busybox ash and the standard bash shell...)

lynxthecat commented 2 years ago

Bash was an intentional design choice. Ash is just too limited - no arrays, no integer maths, etc. My script in 'main' at the moment is ash + awk, but it is horrible to read and work with.

richb-hanover commented 2 years ago

OK. Totally fine. But that makes installing bash a requirement.

lynxthecat commented 2 years ago

I have renamed the repository and branches. Please let me know if you see any issues with the renaming.

The repository is now 'CAKE-autorate' and the branches are:

When I get time I will rework the readme for the new bash implementation in 'main' (and the readme files for the other branches).

richb-hanover commented 2 years ago

Excellent! To expand the second bullet point in the original note

Thanks!

moeller0 commented 2 years ago

For the changelog, I think if you name you commits reasonably just looking at the commit link would do, currently however the commit titles seem not expressive enough for that.

richb-hanover commented 2 years ago

I updated the script in the original post to install the current (as of 20 Mar 2022) CAKE-autorate.sh. The steps in the README do not actually install the files into /root/CAKE-autorate/...

lynxthecat commented 2 years ago

Thanks @richb-hanover. I fixed the readme. Do you know whether it is necessary to 'chmod +x ./config.sh'?

richb-hanover commented 2 years ago
  1. I don't know if chmod +x ./config.sh is necessary. I haven't taken the time to do the research.
  2. I like the [ -d CAKE-autorate ] || mkdir CAKE-autorate because then copy-pastes always work, or it can become a script.

Thanks!