Reasons why kthresher does not do "anything" by default.
- Main purpose is to run it through a cronjob to remove kernels/headers (cadidates for auto-removal)
- When a configuration is put in place the behavior of kthresher is modified so it achieves what's defined in the config
Examples of the change of behavior running kthresher
- Without any additional config, will print the help to understand what it does
- With a config in place will perform that action, e.g. purge kernels
I can easily set a default action, for instance print the available kernels, if any, like what -s
does.
Here I implemented that: https://github.com/tonyskapunk/kthresher/commit/50b67c2b0caa1ca117f8bf3d4b87d5fd39b753d0
But found an issue to it. This would work only without a config in place, once a config defining the purge,
kthresher
will attempt to do purge kernels/headers. There wouldn't be a way to print the available kernels/headers
like running -s
, unless I add some logic to not fully remove that -s
and only implement -s
as the default action
when nothing else is specified through the configuration or command line.
- If we provide headers by default in the config file, there is no way to disable headers through command line.
The only way to not include headers is
- Editing the default config to remove the headers.
- Create another config to override its value.
- Implement a
--no-headers
flag.