From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 7/7] pppoe-server: prevent multiple configs for the same zone Date: Tue, 04 Jul 2017 17:46:11 +0200 Message-ID: <1499183171-24236-7-git-send-email-jonatan.schlag@ipfire.org> In-Reply-To: <1499183171-24236-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0100390229819612459==" List-Id: --===============0100390229819612459== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit It is senseless to configure the ppoe-server hook multiple times for a zone. Signed-off-by: Jonatan Schlag --- src/hooks/configs/pppoe-server | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hooks/configs/pppoe-server b/src/hooks/configs/pppoe-server index 6f95212..22e0906 100644 --- a/src/hooks/configs/pppoe-server +++ b/src/hooks/configs/pppoe-server @@ -52,6 +52,11 @@ hook_new() { local zone=${1} shift + if zone_config_hook_is_configured ${zone} "pppoe-server"; then + log ERROR "You can configure the pppoe-server hook only once for a zone" + return ${EXIT_ERROR} + fi + while [ $# -gt 0 ]; do case "${1}" in --dns-server=*) -- 2.6.3 --===============0100390229819612459==--