From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 5/8] header-config: add generic hhok_hid function Date: Tue, 25 Jul 2017 18:07:10 +0200 Message-ID: <1500998833-10543-6-git-send-email-jonatan.schlag@ipfire.org> In-Reply-To: <1500998833-10543-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8785590740969951018==" List-Id: --===============8785590740969951018== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This function will always be there so when we call hhok_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..76f4bb5 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() { + assert [ $# -eq 1 ] + local config=3D${1} + echo $(config_get_id_from_config ${config}) +} --=20 2.6.3 --===============8785590740969951018==--