#!/usr/bin/execlineb -P
# Load VDEV_* and prep sysfs (replaces separate vdev-early oneshot).
# Multiline sh must live in shell_up: execlineb does not quote '...'.

ifelse { test -x /sbin/vdevd } {
	foreground {
		redirfd -w 1 /dev/null
		redirfd -w 2 /dev/null
		/bin/sh -c "export VDEV_ENV_PERSIST=1 VDEV_ENV_FORCE=1; . /lib/vdev/vdev-env.sh"
	}
	foreground { /bin/mkdir -p /run/vdev }
	foreground {
		/bin/sh /etc/s6-rc/sv/vdev-env/shell_up
	}
	exit 0
}
exit 0
