diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile index 62e90bdded..1d52a1b5e0 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:=13 +PKG_RELEASE:=14 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 9e3872fce2..5e89b5b63e 100644 --- a/net/xinetd/files/xinetd.init +++ b/net/xinetd/files/xinetd.init @@ -62,7 +62,22 @@ config_cb() { local option="$1" local value="$2" - [ -n "$value" ] && [ "$option" != "name" ] && echo -e "\t$option = $value" >> $GENERATED_CONF_FILE + # for the redirect option we have to convert the '[ip address]:port' notation + # in config file to 'ip_address port' in the xinetd config file + if [ "$option" = "redirect" ] && [ -n "$value" ]; then + local redirect_ip="" + local redirect_port="" + + redirect_ip="$(echo ${value%:*})" + redirect_ip="$(echo ${redirect_ip//\[/})" + redirect_ip="$(echo ${redirect_ip//\]/})" + + redirect_port="$(echo ${value##*:})" + + echo -e "\t$option = $redirect_ip $redirect_port" >> $GENERATED_CONF_FILE + else + [ -n "$value" ] && [ "$option" != "name" ] && echo -e "\t$option = $value" >> $GENERATED_CONF_FILE + fi } # redefined callback for lists when calling config_load