#! /bin/sh

. init-script-lib

ttys="tty2 tty3 tty4 tty5 tty6 tty7 tty8"

case $1 in
	start)
		important need filesystems
		fatal need devfs

		need --silent --not-crucial --stop boot-terminal

		for i in $ttys; do
			need --respawn $i /sbin/gogetty /dev/$i
		done
		exit 0
	;;
	stop)
		# if we're bringing the system down, init can't
		# communicate so need won't work

		for i in $ttys; do
			need --silent --not-crucial --dont-spawn $i
		done
		exit 0
	;;
esac

