. /usr/lib/network/functions
+# Read network settings
+network_settings_read
+
# Setup the locking.
LOCKFILE="${RUN_DIR}/.rename_lock"
function cleanup() {
log DEBUG "Interface '${INTERFACE}' is of type '${type}'."
case "${type}" in
- ethernet|real)
+ ethernet)
# Search within all the port configurations
# if this port has already been configured.
for port in $(ports_get_all); do
port=$(port_find_free ${PORT_PATTERN})
echo "${port}"
- log DEBUG "Could not find an existing port configuration for '${INTERFACE}'."
- log DEBUG "${INTERFACE} --> ${port}"
+ log DEBUG "Could not find an existing port configuration for '${INTERFACE}'"
+ log DEBUG "Renaming interface '${INTERFACE}' to '${port}'"
;;
esac