From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH v2 5/8] header-config: add generic hook_hid function Date: Wed, 26 Jul 2017 10:44:41 +0200 Message-ID: <1501058684-19861-5-git-send-email-jonatan.schlag@ipfire.org> In-Reply-To: <1501058684-19861-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3192988649558718876==" List-Id: --===============3192988649558718876== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This function will always be there so when we call hook_hid we will get a res= ult. This is also nice for testing. Signed-off-by: Jonatan Schlag --- src/header-config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/header-config b/src/header-config index e3c6423..1b6f530 100644 --- a/src/header-config +++ b/src/header-config @@ -76,3 +76,11 @@ hook_edit() { =20 exit ${EXIT_OK} } + +# We will return the id as generic variant of the hid +# Although this should not be the standard +hook_hid() { + # the zone name would be ${1} + local config=3D${2} + config_get_id_from_config "${config}" +} --=20 2.6.3 --===============3192988649558718876==--