Discussion:
Can I shorten fw_update download timeout?
Luke Small
2021-04-08 18:50:59 UTC
Permalink
I make unbound connect to dnscrypt-proxy and after an update, it’ll just
sit there for what seems like 2 minutes while fw_update inevitably fails
before turning on dnscrypt-proxy. I’ve been running snapshots and that’s
really dumb. Or is there a way to have unbound connect to a failover server
when the default resolver isn’t responsive that I’m not aware of?--
-Luke
dsp
2021-04-11 14:45:16 UTC
Permalink
I make unbound connect to dnscrypt-proxy and after an update, it’ll just
sit there for what seems like 2 minutes while fw_update inevitably fails
before turning on dnscrypt-proxy. I’ve been running snapshots and that’s
really dumb. Or is there a way to have unbound connect to a failover server
when the default resolver isn’t responsive that I’m not aware of?--
-Luke
well there are many ways to go about this.
Both sysupgrade and fw_update are scripts so they can be easily
modified to your needs. Copy them to your path that takes precedence
and customise them to your needs. fw_update actually is a perl
script that calls the pkg_xxx with the fw_update mode.
From the pkg_add manpage you can see that you can specify
FETCH_CMD to whatever you want. Now you can either write a small
script yourself to either send a SIGALRM after X seconds and listen
for that, or use a another command like curl which implements connect
timeouts. like so
FETCH_CMD="/usr/local/bin/curl --connect-timeout 1" fw_update
Nam Nguyen
2021-04-25 04:28:16 UTC
Permalink
Post by Luke Small
I make unbound connect to dnscrypt-proxy and after an update, it’ll just
sit there for what seems like 2 minutes while fw_update inevitably fails
before turning on dnscrypt-proxy. I’ve been running snapshots and that’s
really dumb. Or is there a way to have unbound connect to a failover server
when the default resolver isn’t responsive that I’m not aware of?--
-Luke
You can have >=0 forward-addr lines.

From unbound.conf(5): "There may be multiple forward-zone: clauses. Each with a
name: and zero or more hostnames or IP addresses."

Loading...