9768 mod_uninstall_interval should be configurable

Review Request #1182 — Created Aug. 26, 2018 and discarded


Honor the comment in mod_uninstall_daemon() and only do periodic unloads if mod_uninstall_interval is not zero, AND don't overwrite mod_uninstall_interval value if modunload -i 0 was called. This way mod_uninstall_daemon functionality can be disabled via /etc/system and it stays disabled no matter what.

Previously, mod_uninstall_interval was set to 0 for both debug and non-debug builds, and when modctl_modunload was called with id of 0 (all modules), it got changed to 60 on debug builds, so there was no way of disabling it other than removing the code.

With this change, mod_uninstall_interval is set to 0 (disabled) on non-debug builds and to 60 seconds (enabled) on debug ones, and its value is no longer changed by the code itself; additionally, I have changed the variable to be "volatile", so the value can be changed in runtime.

Set/unset the moduninstall interval.

Review request changed

Status: Discarded