]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/hooks/ports/ethernet
Remove the function keyword which is a bashism
[people/stevee/network.git] / src / hooks / ports / ethernet
index 35cc8eb3b3a358e182b3567dde6ad1cac9ef15ba..f33777a7d1c098ac6d4ea9b04e452cebd312f3d3 100644 (file)
@@ -26,7 +26,7 @@
 
 HOOK_SETTINGS="HOOK ADDRESS DEVICE"
 
-function hook_check() {
+hook_check_settings() {
        assert ismac DEVICE
 
        if isset ADDRESS; then
@@ -34,7 +34,7 @@ function hook_check() {
        fi
 }
 
-function hook_create() {
+hook_new() {
        local port=${1}
        assert isset port
        shift
@@ -47,35 +47,17 @@ function hook_create() {
        exit ${EXIT_OK}
 }
 
-function hook_up() {
-       local port=${1}
-       assert isset port
-
-       # Read in the confguration file.
-       port_settings_read "${port}" ${HOOK_SETTINGS}
-
-       # Check if the MAC address is the right one.
-       if isset ADDRESS; then
-               device_set_address "${device}" "${ADDRESS}"
-       fi
-
-       # Bring up the device.
-       device_set_up ${port}
-
+hook_create() {
+       # Nothing to do here. Real ethernet devices cannot
+       # be created. They are just there.
        exit ${EXIT_OK}
 }
 
-function hook_down() {
-       local port=${1}
-       assert isset port
-
-       # Set down the device.
-       device_set_down ${port}
-
+hook_remove() {
        exit ${EXIT_OK}
 }
 
-function hook_hotplug_rename() {
+hook_hotplug_rename() {
        local port=${1}
        assert isset port