Thoughts on designs for the rest of the testing.

Next there are two categories of environment checks that need to be made.

One is “this tool is a drop in replacement for this other tool, and one of them exist”.

One of those is Yacc to Bison, another is awk to gawk.  I’m sure others will come up as this evolves after the first iteration but these are legacy transition items.

The other category is “this environment variable is set and is present in bashrc for both this user and root”.  One of these types may need to exit the shell and respawn back into it after remediation though.

I had previously said that both categories will have remediation steps, which, unfortunately this can not be done without breaking the distribution abstraction taking place.

The environment variable check category will have remediation steps that are supplied much like the version command attribute for version checks in the json configuration file, however, most of the environment variables I would be setting are placeholders for directories which can be variables in the python framework just as well, so we may not have that category of tests.  I’ll need to do further analysis.

There will also at some point need to be some assumptions of best practices in place for the shell environment, e.g., user is sourcing their bashrc on chroot etc. if the env variables end up being required.

Glad to see bash go.


So, regarding the symlink checks, I’ve begun the process of implementing these in the configuration file.  I’ve found a way to include user supplied modules that can do remediations.  I’ll be going back and implementing this for the version checks as well.

That way, the solution itself can continue to be distro independent without sacrificing feature.

I’m explaining this terribly:

So, final solution will have a modules directory.  For the autoheal command attribute, you’d put the path to the script that would execute when that check fails, provided that the autoheal attribute is set to “True”.  It is suggested to keep remediations as a script in the modules directory to keep things clean.

I will not be building the autoheal modules but will be leaving this easy shim for all tests so that users can contribute to them.

After the autoheal command is ran, the script will rerun the check that triggered it.  If it fails that re-check it means the autoheal command does not autoheal and this will create a stop in the checks.  This will ensure bad remediations don’t jinx the entire process.