summaryrefslogtreecommitdiff
path: root/sys/lib/newuser
blob: 4f2e02145117835e9f17968fe74a195304481d71 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/rc

user=`{cat /dev/user}
home=/usr/$user
if(test -f $home/lib/profile){
	echo user directories already made
	exit no
}
cd $home
x='$'
mkdir bin bin/rc bin/mips bin/386 bin/power bin/arm
mkdir lib tmp
chmod +t tmp
bind -c $home/tmp /tmp

mail -c
auth/cron -c

cat > lib/profile <<!
bind -a $x^home/bin/rc /bin
bind -a $x^home/bin/$x^cputype /bin
bind -c $x^home/tmp /tmp
font = /lib/font/bit/pelm/euro.9.font
switch($x^service){
case terminal
	plumber
	startupasfs
	echo -n accelerated > '#m/mousectl'
	echo -n 'res 3' > '#m/mousectl'
	prompt=('term% ' '	')
	fn term%{ $x^* }
	exec rio
case cpu
	if (test -e /mnt/term/mnt/wsys) {
		# rio already running
		wsys = /mnt/term^`{cat /mnt/term/env/wsys}
		bind -a /mnt/term/mnt/wsys /dev
		echo -n $x^sysname > /dev/label
	}
	bind /mnt/term/dev/cons /dev/cons
	bind /mnt/term/dev/consctl /dev/consctl
	bind -a /mnt/term/dev /dev
	prompt=('cpu% ' '	')
	fn cpu%{ $x^* }
	startupasfs
	news
	if (! test -e /mnt/term/mnt/wsys) {
		# cpu call from drawterm
		font=/lib/font/bit/pelm/latin1.8.font
		plumber
		auth/factotum
		exec rio
	}
case con
	prompt=('cpu% ' '	')
	startupasfs
	news
}
!
cat > lib/plumbing <<!
# to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules

editor = acme

include basic

!

. lib/profile