Skip to content
Snippets Groups Projects

resolver-conf: fix resolver config for mvebu

Merged Josef Schlehofer requested to merge hotfix/preferred-forwarder into master
1 unresolved thread
@@ -42,7 +42,7 @@ endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/config
ifeq ($(CONFIG_TARGET_mvebu_Turris-Omnia),y)
    • Contributor

      Looking at this, shouldn't logic be modified here? Shouldn't we have default config for unbound and kresd and detect if kresd is available and if not use unbound one?

      Edited by Karel Koci
      • Author Contributor

        Sure thing. I thought there is knot-resolver package available for Turris 1.x, but it seems not. Can you check it, now? I changed it as you suggested. I compiled it for Turris Omnia and Turris 1.x. Verified contents of package. It is how it should be.

        I was not able to use ifeq ($(CONFIG_PACKAGE_knot-resolver),y), because knot-resolver is not marked as critical package (=Y )

      • Contributor

        You can probably do:

        ifneq ($(filter-out n,$(CONFIG_PACKAGE_knot-resolver)),)

        This rather checks if CONFIG_PACKAGE_knot-resolver is not set to empty or n value. Other option would be to use ifeq and filter function to filter y and n. Your's choice.

        Edited by Karel Koci
      • Author Contributor

        I was thinking to filter y and n, but it seemed to me like complicated, but your approach seems good in the end. I will change it. Thanks.

      • Author Contributor

        Tested for both routers. Unset Knot and set Knot and changes were done correctly.

      • Please register or sign in to reply
Please register or sign in to reply
ifneq ($(filter-out n,$(CONFIG_PACKAGE_knot-resolver)),)
$(INSTALL_CONF) ./files/resolver-omnia-config $(1)/etc/config/resolver
else
$(INSTALL_CONF) ./files/resolver-turris-config $(1)/etc/config/resolver
@@ -56,7 +56,7 @@ endif
$(INSTALL_DIR) $(1)/etc/resolver/dns_servers
$(INSTALL_DIR) $(1)/usr/share/resolver
$(INSTALL_BIN) ./files/resolver-func.sh $(1)/usr/share/resolver/functions.sh
ifeq ($(CONFIG_TARGET_mvebu),y)
ifneq ($(filter-out n,$(CONFIG_PACKAGE_knot-resolver)),)
$(INSTALL_CONF) ./files/dns_servers/* $(1)/etc/resolver/dns_servers/
else
$(INSTALL_CONF) ./files/dns_servers_turris1x/* $(1)/etc/resolver/dns_servers/