]> git.ipfire.org Git - people/stevee/network.git/commitdiff
header-config: add generic hook_hid function
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Wed, 26 Jul 2017 08:44:41 +0000 (10:44 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Jul 2017 09:50:24 +0000 (11:50 +0200)
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 <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/header-config

index 868dce499710ad8761a9c2aa3285f367b977fa82..6341a22bd0774245ba0a055155ed2ddf206aaf08 100644 (file)
@@ -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}"
+}