HOOK_SETTINGS="HOOK ADDRESS DEVICE"
-function hook_check() {
+hook_check_settings() {
assert ismac DEVICE
if isset ADDRESS; then
fi
}
-function hook_create() {
+hook_new() {
local port=${1}
assert isset port
shift
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