start_aoe()
{
	local dev=e0.0
	local if=$(GetNetIf)
	local maxout=
	local timeout=

	for p in $(substchar "$params" "," " "); do
		arg=${p#*=}
		case "$p" in
			dev=*|d=*) dev="/dev/etherd/${arg#/dev/etherd}" ;;
			netif=*) if="$arg" ;;
			aoe_deadsecs=*|deadsecs=*|timeout=*) timeout=$arg ;;
			aoe_maxout=*|maxout=*) maxout=$arg ;;
			*) echo "Unknown NBD parameter '$p' for type 'aoe'" ;;
		esac
	done

	modprobe -q aoe aoe_iflist="$if" ${maxout:+aoe_maxout=$maxout} ${timeout:+aoe_deadsecs=$timeout} &&
	udevadm settle &&
	echo > /dev/etherd/discover

	ROOT=${ROOT:-$dev}
}

start_aoe
