[BACK]Return to ttys CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / ttys (download)

Revision 1.2, Sat May 13 08:45:10 2000 UTC (19 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.1: +2 -2 lines

Use load_rc_config() (from rc.subr) instead of sourcing /etc/rc.conf.
This allows us or a user to change the configuration file method in
one place - rc.subr - without having to edit all of the rc.d/* files.

#!/bin/sh
#
# $NetBSD: ttys,v 1.2 2000/05/13 08:45:10 lukem Exp $
#

# PROVIDE: tty
# REQUIRE: root

. /etc/rc.subr

name="ttyflags"
start_cmd="ttyflags_start"
stop_cmd=":"

ttyflags_start()
{
	#	set flags on ttys.
	#	(do early, in case they use tty for SLIP in network)
	#
	echo "Setting tty flags."
	ttyflags -a

	#	setup ptys
	#
	#	XXX:	there may be more ptys than this; maybe use
	#		sysctl to find out how many?
	#
	chmod 666 /dev/tty[pqrs]*
}

load_rc_config $name
run_rc_command "$1"