+ if [ ${ret} -eq ${EXIT_OK} ]; then
+ log DEBUG "Successfully created bonding device '${device}'"
+ else
+ log ERROR "Could not create bonding device '${device}'"
+ return ${EXIT_ERROR}
+ fi
+
+ # Set the mode of the bonding device.
+ print "${mode}" > ${SYS_CLASS_NET}/${device}/bonding/mode
+ local ret=$?
+
+ if [ ${ret} -ne ${EXIT_OK} ]; then
+ log ERROR "Could not set mode of bonding device '${device}': ${Mmode}"
+ return ${EXIT_ERROR}
+ fi
+
+ if isset address; then
+ device_set_address ${device} ${address}
+ fi
+
+ return ${EXIT_OK}