-
Notifications
You must be signed in to change notification settings - Fork 385
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
olsrd: don't start service when ignored #780
base: master
Are you sure you want to change the base?
Conversation
When olsrd was disabled by uci (olsrd.olsrd.ignore=true), the service got started anyway. This results in olsrd spamming the syslog when getting started by procd without a valid configuration: -- daemon.err olsrd[8223]: olsrd exit: main: Bad configuration -- This commit only starts the olsrd service when not set to ignore. Signed-off-by: Daniel Danzberger <[email protected]>
Why do you need a disable flag, when you can disable the complete service? |
So I can disable it via config without having to call /etc/inti.d/olsrd disable, like most services in openwrt |
If you do that and set it on ignore, what is |
root@openwrt:~# /etc/init.d/olsrd status
|
This seems to me a duplication of functionality. You can already disable the service.
Reading the above it seems that you are proposing a workaround for a bug of another component. You should fix the root cause of the UCI config not correctly disabling the service. |
dnsmasq, for example:
|
I have to say to I also have In face of this use case, this MR seem to have a valid use case. @zioproto what do you think? |
@@ -1,6 +1,7 @@ | |||
config olsrd | |||
config olsrd olsrd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the second olsrd
word a typo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait, I understand how, it is because UCI expects olsrd.olsrd.ignore=true
@mwarning your use case with multiple instances makes sense. But this PR to olsrd does not involve multiple instances to be turned off individually. It seems to me this is a workaround to fix a UCI problem expecting @dddaniel can you clarify if the Olsrd config is using the "unnamed section" that is a valid UCI syntax: Please provide more context so we can identify the correct place where to fix this issue. I suspect this is just a web interface implementation bug. thank you |
Hi @zioproto,
There is no multi instance for the current olsrd. The init script always just starts one instance in the start_service() hook.
Naming the section doesn't break anything, If there would be code that iterates over all sections with config_foreach, it would still work when the section has a name. It get's an anonymous name derived form it's hash anyway if no name is set. I could rename it to 'global' which would make it more readable/obvious. |
The main use I can see is for disabling Update: Yes, it does work. Unfortunately it assumes the priority of olsrd remains 65, but it's probably OK that way. |
When olsrd was disabled by uci (olsrd.olsrd.ignore=true),
the service got started anyway.
This results in olsrd spamming the syslog when getting started by
procd without a valid configuration:
daemon.err olsrd[8223]: olsrd exit: main: Bad configuration
This commit only starts the olsrd service when not set to ignore.
Signed-off-by: Daniel Danzberger [email protected]
Maintainer: me / @<github-user> (find it by checking history of the package Makefile)
Compile tested: (put here arch, model, OpenWrt version)
Run tested: (put here arch, model, OpenWrt version, tests done)
Description: