]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/hooks/configs/dhcp
hooks: Add HOOK_UNIQUE which stops us from creating multiple instances
[people/ms/network.git] / src / hooks / configs / dhcp
index ba5608a9f644832639b8f7fa5940e1c0fbeaa62a..127ce5915e3cbed2eca6ef44d809dffb65296be7 100644 (file)
@@ -60,31 +60,6 @@ hook_parse_cmdline() {
        fi
 }
 
-hook_new() {
-       local zone="${1}"
-       shift
-
-       if zone_config_hook_is_configured ${zone} "dhcp"; then
-               log ERROR "You can configure the dhcp hook only once for a zone"
-               return ${EXIT_ERROR}
-       fi
-
-       local id=$(zone_config_get_new_id ${zone})
-       log DEBUG "ID for the config is: ${id}"
-
-       # Import defaults
-       hook_set_defaults
-
-       if ! hook_parse_cmdline "${id}" "$@"; then
-               # Return an error if the parsing of the cmd line fails
-               return ${EXIT_ERROR}
-       fi
-
-       zone_config_settings_write "${zone}" "${HOOK}" "${id}"
-
-       exit ${EXIT_OK}
-}
-
 hook_up() {
        local zone=${1}
        local config=${2}