From 631e3fa10faeb60f57ddfd207c7f569c49d2880c Mon Sep 17 00:00:00 2001 From: "Fritz D. Ansel" Date: Thu, 12 Aug 2021 14:01:48 +0200 Subject: [PATCH 1/2] xinetd: support for anonym configs config by names clashes if a service supports udp and tcp, eg time and daytime Signed-off-by: Fritz D. Ansel --- net/xinetd/Makefile | 2 +- net/xinetd/files/xinetd.init | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile index ef44d93ce..99b576121 100644 --- a/net/xinetd/Makefile +++ b/net/xinetd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xinetd PKG_VERSION:=2.3.15 -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/xinetd-org/xinetd/archive diff --git a/net/xinetd/files/xinetd.init b/net/xinetd/files/xinetd.init index bfc9b318d..699d6fa58 100644 --- a/net/xinetd/files/xinetd.init +++ b/net/xinetd/files/xinetd.init @@ -43,7 +43,7 @@ config_cb() { fi local type="$1" - local name="$2" + local name="$(uci -q get xinetd.$2.name || echo $2)" if [ "$type" = "service" ]; then @@ -62,7 +62,7 @@ config_cb() { local option="$1" local value="$2" - [ -n "$value" ] && echo -e "\t$option = $value" >> $GENERATED_CONF_FILE + [ -n "$value" ] && [ "$option" != "name" ] && echo -e "\t$option = $value" >> $GENERATED_CONF_FILE } # redefined callback for lists when calling config_load From afdc1c2a7517f701d75bf27a34479ec84d0be0fb Mon Sep 17 00:00:00 2001 From: "Fritz D. Ansel" Date: Thu, 12 Aug 2021 14:05:09 +0200 Subject: [PATCH 2/2] xinetd: fix syntax violation see https://github.com/openwrt/packages/pull/16318#discussion_r687481110 Signed-off-by: Fritz D. Ansel --- net/xinetd/files/xinetd.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xinetd/files/xinetd.init b/net/xinetd/files/xinetd.init index 699d6fa58..9e3872fce 100644 --- a/net/xinetd/files/xinetd.init +++ b/net/xinetd/files/xinetd.init @@ -71,7 +71,7 @@ config_cb() { local value="$2" # write out last list option if new list starts - if [ "$ListName" != "" -a "$ListName" != "$name" ]; then + if [ -n "$ListName" ] && [ "$ListName" != "$name" ]; then echo -e "\t$ListName = $ListVals" >> $GENERATED_CONF_FILE