assert isset port
# Save configuration
- if port_settings_write "${port}" ${HOOK_SETTINGS[*]}; then
+ if port_settings_write "${port}"; then
log INFO "New port ${port} has been created"
else
error "Could not save configuration for ${port}"
# Exit silently if the device already exists
device_exists "${port}" && exit ${EXIT_OK}
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Create the bonding devices
bonding_create "${port}" \
local port="${1}"
assert isset port
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Remove the bonding device
if device_exists "${port}"; then
local port="${1}"
assert isset port
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Auto-enable or disable hardware offloading
if ! isset OFFLOADING || enabled OFFLOADING; then
local port="${1}"
assert isset port
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Bring down all slaves
local slave
# Handle events of the same interface
if hotplug_event_port_is_interface "${port}"; then
# Read configuration
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Bring up all slaves
# Attach those which already exist and try to create
local port=$(port_find_free ${DUMMY_PORT_PATTERN})
assert isset port
- if port_settings_write "${port}" ${HOOK_SETTINGS[*]}; then
+ if port_settings_write "${port}"; then
log INFO "New dummy port '${port}' has been created"
fi
assert isset port
# Read configuration
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Create the dummy device
dummy_create "${port}" "${ADDRESS}"
local device=${2}
assert isset device
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
if [ "${ADDRESS}" = "$(device_get_address ${device})" ]; then
log DEBUG "Device '${device}' equals port '${port}'."
local DEVICE="$(device_get_address "${device}")"
- if ! port_settings_write "${port}" ${HOOK_SETTINGS[*]}; then
+ if ! port_settings_write "${port}"; then
log ERROR "Could not write settings for port ${port}"
return ${EXIT_ERROR}
fi
local port="${1}"
local ${HOOK_SETTINGS[*]}
- if ! port_settings_read "${port}" ${HOOK_SETTINGS[*]}; then
+ if ! port_settings_read "${port}"; then
log ERROR "Could not read settings for port ${port}"
return ${EXIT_ERROR}
fi
assert isset device
# Read in the conifguration file.
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Get the current MAC address of the device.
local address=$(device_get_address ${device})
assert isset port
local ${HOOK_SETTINGS[*]}
- if ! port_settings_read "${port}" ${HOOK_SETTINGS[*]}; then
+ if ! port_settings_read "${port}"; then
log ERROR "Could not read settings for port ${port}"
return ${EXIT_ERROR}
fi
assert isset device
local ${HOOK_SETTINGS[*]}
- if ! port_settings_read "${port}" ${HOOK_SETTINGS[*]}; then
+ if ! port_settings_read "${port}"; then
log ERROR "Could not read settings for port ${port}"
return ${EXIT_ERROR}
fi
local port="${PARENT_DEVICE}${VLAN_PORT_INTERFIX}${TAG}"
- port_settings_write "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_write "${port}"
exit ${EXIT_OK}
}
assert isset port
shift
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
while [ $# -gt 0 ]; do
case "${1}" in
shift
done
- port_settings_write "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_write "${port}"
exit ${EXIT_OK}
}
device_exists "${port}" && exit ${EXIT_OK}
# Read configruation
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Create the VLAN device
vlan_create "${port}" "${PARENT_DEVICE}" "${TAG}" "${ADDRESS}"
device_exists "${port}" && exit ${EXIT_OK}
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Check if the PHY is present.
local phy=$(phy_get ${PHY})
assert isset port
# Read settings
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
# Check if the PHY is present.
local phy="$(phy_get "${PHY}")"
local port="${1}"
assert isset port
- port_settings_read "${port}" ${HOOK_SETTINGS[*]}
+ port_settings_read "${port}"
case "$(hotplug_action)" in
add)