Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Improvements #66

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

Martinski4GitHub
Copy link

@Martinski4GitHub Martinski4GitHub commented Feb 10, 2025

  1. Added code to check if sufficient JFFS storage space is available before moving database files/folders from USB location to JFFS partition. An error message is reported if not enough space is available, and the move request is aborted.

  2. Added code to check if available JFFS storage space falls below 20% of total space or 10MB (whichever is lower) and report a warning when it does. A warning message is also shown on the SSH CLI menu and WebGUI page.

  3. Added and modified code so that every time the SSH CLI menu is run, it checks if the WebGUI page has already been mounted. If not found mounted, the script will run the code to remount the WebGUI.

  4. Improved code that creates (during installation) and removes (during uninstallation) the "AddOns" menu tab entry for the WebGUI to make sure it checks for and takes into account other add-ons that may have been installed before or were later installed after the initial installation.

  5. Added "export PATH" statement to give the built-in binaries higher priority than the equivalent Entware binaries.

  6. Various code improvements & fine-tuning.

1) Added code to check if sufficient JFFS storage space is available before moving database files/folders from USB location to JFFS partition. An error message is reported if not enough space is available, and the move request is aborted. The storage check reserves 10MB of space so that JFFS partition has sufficient space left to work with the router after moving the database files/folders over.

2) Added code to check if available JFFS storage space falls below 20% of total space or 10MB (whichever is lower) and report an error when it does. A warning message is also shown on the SSH CLI menu and WebGUI page.

3) Added "export PATH" statement to make the built-in binaries have higher priority than the equivalent Entware binaries.

4) Various code improvements & fine-tuning.
Addressing Codacy Static Code Analysis errors.
Addressing Codacy Static Code Analysis checks.
Addressing Codacy Static Code Analysis checks.
Addressing Codacy Static Code Analysis checks.
@Martinski4GitHub
Copy link
Author

@jackyaz.

This latest PR includes improvements & checks to help users who at some point attempt to change the current "Storage Location" from USB to JFFS to make sure that there's enough available free space to hold all the database-related files & folders.

Example screenshot when the currently available JFFS storage space looks good:

Connmon_v3 0 3_CLI_Menu_JFFS_OK

Example screenshots when the currently available JFFS storage space falls below the minimum reserved space
(using a fake limit for testing & debugging purposes only) :

Connmon_v3 0 3_CLI_Menu_JFFS_Warning

Connmon_v3 0 3_WebGUI_JFFS_Warning

Added and modified code so that every time the SSH CLI menu is run, it checks if the WebGUI page has already been mounted. If not found mounted, the script will run the code to remount the WebGUI.
Improved code that creates (during installation) and removes (during uninstallation) the "AddOns" menu tab entry for the WebGUI to make sure it checks for and takes into account other add-ons that may have been installed before or were later installed after the initial installation.
Fine-tuning code.
Some code improvements & fine-tuning.
Improvements & Fine-Tuning
Minor code improvements.
@Martinski4GitHub
Copy link
Author

@jackyaz,

Let me know if you have any questions or concerns about the latest changes in this PR.
A handful of people have been running this latest code and it's been working well, so IMO it's ready to be merged.

Thanks.

Shellcheck codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant