From: Jonatan Schlag Date: Wed, 26 Jul 2017 08:44:41 +0000 (+0200) Subject: header-config: add generic hook_hid function X-Git-Tag: 009~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=196b3149489775ec7d06c189823f995eeae37803;p=network.git header-config: add generic hook_hid function This function will always be there so when we call hook_hid we will get a result. This is also nice for testing. Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/header-config b/src/header-config index 868dce49..6341a22b 100644 --- a/src/header-config +++ b/src/header-config @@ -80,3 +80,13 @@ hook_edit() { hook_destroy() { return ${EXIT_OK} } + + +# Returns the ID as a unique identifier +# Should always be overwritten by a hook +hook_hid() { + local zone=${1} + local config=${2} + + config_get_id_from_config "${config}" +}