File: create_vcs

package info (click to toggle)
gpm 1.20.7-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,960 kB
  • sloc: ansic: 8,702; yacc: 1,054; sh: 1,034; makefile: 387; cpp: 241; lisp: 222; awk: 82; sed: 6
file content (25 lines) | stat: -rwxr-xr-x 543 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/sh
#
# Script by Jakub Jelinek
# Modified by Ian Zimmerman <itz@rahul.net> to reflect names from
# kernel device list
# $Id: create_vcs,v 1.2 2002/05/28 19:13:52 nico Exp $

if test -e /dev/vcs0 || test -e /dev/vcs
then
	exit
fi

I=0
while [ $I -lt 25 ] 
do
        mknod /dev/vcs$I c 7 $I
        chmod 622 /dev/vcs$I
        chown root.tty /dev/vcs$I
        mknod /dev/vcsa$I c 7 `expr $I + 128`
        chmod 622 /dev/vcsa$I
        chown root.tty /dev/vcsa$I
        I=`expr $I + 1`
done
ln -s vcs0 /dev/vcs
ln -s vcsa0 /dev/vcsa