Home | History | Annotate | Line # | Download | only in rc.d
ttys revision 1.3
      1 #!/bin/sh
      2 #
      3 # $NetBSD: ttys,v 1.3 2001/04/25 12:59:16 lukem Exp $
      4 #
      5 
      6 # PROVIDE: tty
      7 # REQUIRE: root
      8 
      9 . /etc/rc.subr
     10 
     11 name="ttyflags"
     12 start_cmd="ttyflags_start"
     13 stop_cmd=":"
     14 
     15 ttyflags_start()
     16 {
     17 	#	set flags on ttys.
     18 	#	(do early, in case they use tty for SLIP in network)
     19 	#
     20 	echo "Setting tty flags."
     21 	ttyflags -a
     22 
     23 	#	setup ptys
     24 	#
     25 	#	XXX:	there may be more ptys than this; maybe use
     26 	#		sysctl kern.maxptys to find out how many?
     27 	#
     28 	chmod 666 /dev/tty[p-uw-zP-T][0-9a-f]
     29 
     30 	#	only change ttyv* if ttyv0 is not reserved by a console.
     31 	#
     32 	if [ -c /dev/ttyv1 ]; then
     33 		chmod 666 /dev/ttyv[0-9a-f]
     34 	fi
     35 }
     36 
     37 load_rc_config $name
     38 run_rc_command "$1"
     39