#!/bin/sh
# Supervised early vdevd (called from vdevd-srv/run).
set -e
if [ -r /lib/vdev/vdev-env.sh ]; then
	. /lib/vdev/vdev-env.sh
elif [ -r /run/vdev/env ]; then
	. /run/vdev/env
fi
: "${VDEV_BIN:=/sbin/vdevd}"
: "${VDEV_CONFIG_DIR:=/etc/vdev}"
: "${VDEV_EARLY:=vdevd.early.conf}"
: "${VDEV_MOUNTPOINT:=/dev}"
export VDEV_JSON_STATE=early
exec "$VDEV_BIN" -f -c "${VDEV_CONFIG_DIR}/${VDEV_EARLY}" "${VDEV_MOUNTPOINT}"
