fi
}
-function hook_create() {
+function hook_new() {
local port=${1}
assert isset port
shift
exit ${EXIT_OK}
}
-function hook_up() {
- local port=${1}
- assert isset port
-
- if ! device_exists "${port}"; then
- log WARNING "Cannot bring up port '${port}' which does not exist"
- exit ${EXIT_OK}
- fi
-
- # 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}"
-
+function 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}
-
+function hook_remove() {
exit ${EXIT_OK}
}