]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/header-port
hooks: Automatically set defaults for all port hooks
[people/ms/network.git] / src / header-port
index 6cf0cc9fb83c854b2810cbd9dfa6868319e82245..141228ae89a22fe0eed7d90edc92ced11be39ba2 100644 (file)
@@ -21,6 +21,8 @@
 
 INFO_SETTINGS="HOOK PORT_PARENTS PORT_CHILDREN"
 
+HOOK_PORT_PATTERN="${PORT_PATTERN}"
+
 # This function is called after a device has been plugged
 # into the system and got its correct name.
 # The function is intended to create child ports and things
@@ -42,6 +44,10 @@ hook_hotplug_rename() {
 
 hook_default_new() {
        local ${HOOK_SETTINGS}
+
+       # Import all default variables
+       hook_set_defaults
+
        if ! hook_parse_cmdline "$@"; then
                return ${EXIT_ERROR}
        fi