Replacing deferrable reboot with watchcat#1186
Conversation
|
Hi! I did not test yet. Just trying to comment the code by eye, I could be wrong: For the Makefile, there is a "new" and more compact format using the libremesh.mk file, you can see many examples in the files modified by this pull request: #1139 It would be helpful to add an example of configuration in lime-example.txt https://github.com/libremesh/lime-packages/blob/master/packages/lime-docs/files/www/docs/lime-example.txt It looks like all the settings are currently hardcoded, is it so? I would not use Google's 8.8.8.8 as the default ping target. Rather, we can use the same that is in place for deferrable-reboot (4.2.2.2 b.resolvers.Level3.net) https://github.com/libremesh/lime-packages/blob/master/packages/lime-docs/files/www/docs/lime-example.txt#L25 |
|
Nice, so I have a doubt here, do we need to add a fallback configuration if it doesnt find a If we do the last option it will stay with this configuration |
In case an option is not specified in /etc/config/lime-*, it seems more than reasonable to use the fallback from the upstream package actually... Great proposal, thanks! So, if we want to propose a default alternative to 8.8.8.8 we should include it in /etc/config/lime-defaults Also, what about including an "enabled" true/false option? I mean: if, in the future, we decide to include watchcat by default in the firmware images, it should not run before the user chooses the target IP and explicitly decides to enable it. |
I'm still analyzing the enable option, but I wanted to make this push for you to help me testing if its possible :) |
|
The code looks great! :D I took the liberty to edit myself the Makefile, I hope you don't mind. If you prefer the things to be different, feel free to revert my edits. Adding a configuration piece in But what I would expect is that the original rule disappears, do you agree that it would be reasonable? What do you think about adding this "delete also the original rule" in the Also, it would be convenient that Seems that the clean function is executed every time So there would be no need for an enable/disable option, as deleting the configuration section would be the simple way for disabling watchcat. |
|
Thanks for the Makefile changes! Yes I agree with the original rule, I'll work on it. About the service watchcat reload, maybe using something like |
|
In these new commits I modified the clear function, now it really clears the original rule, I tested it but it will be great if you check it too :) Also I added a simple function to use the reload command, I noticed that it doesn't throw any log so I didn't use the |
ilario
left a comment
There was a problem hiding this comment.
Tested. It works perfectly, congratulations!
This implementation covers the suggestion made here. The code configures watchcat every time
lime-configis run.For the moment
deferrable-reboothas not been removed.Please review and let me know if you think it is safe to remove
deferrable-rebootentirely, or if further adjustments are needed.