Skip to content
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

gluon-wan-dnsmasq: rewrite initfile to use procd #2969

Merged

Conversation

blocktrron
Copy link
Member

Rewrite the gluon-wan-dnsmasq initfile to use procd. This allows for configuring restart handling by procd in case of a crash.

While at it, disable the caching feature optionally used for the regular dnsmasq on the wan dnsmasq. This daemon is only for redirecting DNS requests to use local network resolvers, not introducing caching.

@rotanid
Copy link
Member

rotanid commented Sep 9, 2023

@T-X can you test if this fixes #2950 for you?


RESOLV_CONF_DIR=/var/gluon/wan-dnsmasq
RESOLV_CONF=$RESOLV_CONF_DIR/resolv.conf


start() {
start_service() {
mkdir -p $RESOLV_CONF_DIR
/lib/gluon/wan-dnsmasq/update.lua
Copy link
Member

@neocturne neocturne Sep 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that there may be a race condition between the init script and the hotplug.d call of /lib/gluon/wan-dnsmasq/update.lua (unrelated to this PR, but we might as well fix it now).

I think it should be sufficient to replace the update.lua call here with a touch "$RESOLV_CONF": If the WAN interface is not up at this point yet, update.lua would just have created an empty resolv.conf here, and if it is, a proper resolv.conf has been (or is currently being) created by the hotplug script.

Rewrite the gluon-wan-dnsmasq initfile to use procd. This allows for
configuring restart handling by procd in case of a crash.

While at it, disable the caching feature optionally used for the regular
dnsmasq on the wan dnsmasq. This daemon is only for redirecting DNS
requests to use local network resolvers, not introducing caching.

Signed-off-by: David Bauer <[email protected]>
@blocktrron blocktrron added the backport v2023.1.x Backport this pull request to v2023.1.x label Sep 20, 2023
@blocktrron blocktrron merged commit 46b90c1 into freifunk-gluon:master Sep 20, 2023
10 checks passed
@github-actions
Copy link

Successfully created backport PR for v2023.1.x:

hafu pushed a commit to Freifunk-Potsdam/gluon that referenced this pull request Jun 2, 2024
Rewrite the gluon-wan-dnsmasq initfile to use procd. This allows for
configuring restart handling by procd in case of a crash.

While at it, disable the caching feature optionally used for the regular
dnsmasq on the wan dnsmasq. This daemon is only for redirecting DNS
requests to use local network resolvers, not introducing caching.

Signed-off-by: David Bauer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. topic: package Topic: Gluon Packages backport v2023.1.x Backport this pull request to v2023.1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants