From 6a25e9b23888854d7eff15378eac98d29e3660ec Mon Sep 17 00:00:00 2001 From: "Gregory L. Dietsche" Date: Wed, 12 Dec 2018 11:02:05 -0600 Subject: [PATCH] net/safe-search: Fix double installation bug If safe search is built directly into an image, the /etc/config/dhcp file will have multiple entries added to it after using sysupgrade for the nth time (2 or more sysupgrade cycles). In /etc/config/dhcp, this bug creates duplicate entries like this: config dnsmasq list addnhosts '/etc/safe-search/enabled' list addnhosts '/etc/safe-search/enabled' This patch ensures that safe search only registers itself one time. Signed-off-by: Gregory L. Dietsche --- net/safe-search/Makefile | 2 +- net/safe-search/files/safe-search.defaults | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/safe-search/Makefile b/net/safe-search/Makefile index 4676c21440..1a89901216 100644 --- a/net/safe-search/Makefile +++ b/net/safe-search/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=safe-search PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=MIT PKG_MAINTAINER:=Gregory L. Dietsche diff --git a/net/safe-search/files/safe-search.defaults b/net/safe-search/files/safe-search.defaults index a2158aaacb..d72399d7ca 100644 --- a/net/safe-search/files/safe-search.defaults +++ b/net/safe-search/files/safe-search.defaults @@ -3,6 +3,7 @@ # Copyright (c) 2018 Gregory L. Dietsche # This is free software, licensed under the MIT License # +uci del_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled uci commit dhcp -- 2.30.2