# Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
[ -f "$BONDING_MASTERS" ] || {
echo "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
- proto_notify_error "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST
proto_block_restart "$cfg"
return
}
for slave in $slaves; do
if [ "$(cat /proc/net/dev |grep "$slave")" == "" ]; then
- echo "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
- proto_notify_error "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
+ echo "$cfg" "No slave device $slave found"
+ proto_notify_error "$cfg" NO_DEVICE
proto_block_restart "$cfg"
return
fi
# For static configuration we _MUST_ have an IP address
[ -z "$ipaddr" ] && {
- echo "$cfg" "INVALID LOCAL ADDRESS"
- proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS"
+ echo "$cfg" "No local IP address defined"
+ proto_notify_error "$cfg" INVALID_LOCAL_ADDRESS
proto_block_restart "$cfg"
return
}
# Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
[ -f "$BONDING_MASTERS" ] || {
echo "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
- proto_notify_error "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST
proto_block_restart "$cfg"
return
}