#!/usr/bin/execlineb -P
fdmove -c 2 1
s6-notifyoncheck -t 30000 -n 60 -w 250
# When vdev is the device manager, import /run/vdev/env (same as vdev-coldplug)
# and wait for early coldplug before enumerating seats.
foreground {
	ifelse { test -d /run/vdev/env }
	{
		s6-envdir /run/vdev/env			
		multisubstitute
		{
			importas -D /run/vdev/vdev.ready VDEV_EARLY_STAMP VDEV_EARLY_STAMP
		}			
		loopwhilex
		ifelse { test -f ${VDEV_EARLY_STAMP} }
		{ exit 1 }
		sleep 0.2
	}
	{ }
}
	
exec /usr/libexec/elogind
