]> git.lizzy.rs Git - plan9front.git/blob - sys/lib/newuser
igfx: fix sandybridge fdi link training bits and ordering
[plan9front.git] / sys / lib / newuser
1 #!/bin/rc
2
3 user=`{cat /dev/user}
4 home=/usr/$user
5 if(test -f $home/lib/profile){
6         echo user directories already made
7         exit no
8 }
9 cd $home
10 x='$'
11 mkdir bin bin/rc bin/mips bin/386 bin/amd64 bin/power bin/arm
12 mkdir lib tmp
13 chmod +t tmp
14 bind -qc /n/other/usr/$user/tmp $home/tmp
15 bind -c $home/tmp /tmp
16 mail -c
17 auth/cron -c
18
19 cat > lib/profile <<!
20 bind -qa $x^home/bin/rc /bin
21 bind -qa $x^home/bin/$x^cputype /bin
22 font=/lib/font/bit/vga/unicode.font
23 switch($x^service){
24 case terminal
25         webcookies
26         webfs
27         plumber
28         echo -n accelerated > '#m/mousectl'
29         echo -n 'res 3' > '#m/mousectl'
30         prompt=('term% ' '      ')
31         fn term%{ $x^* }
32         rio
33 case cpu
34         bind /mnt/term/dev/cons /dev/cons
35         bind -q /mnt/term/dev/consctl /dev/consctl
36         >[2] /dev/null {
37                 cp /dev/sysname /mnt/term/dev/label
38                 if(wsys=`{cat /mnt/term/env/wsys})
39                         wsys=/mnt/term^$x^wsys
40         } 
41         bind -a /mnt/term/dev /dev
42         prompt=('cpu% ' '       ')
43         fn cpu%{ $x^* }
44         if(! test -e /mnt/term/dev/wsys){
45                 # call from drawterm
46                 if(test -e /mnt/term/dev/secstore){
47                         auth/factotum -n
48                         read -m /mnt/term/dev/secstore >/mnt/factotum/ctl
49                         echo >/mnt/term/dev/secstore
50                 }
51                 if not
52                         auth/factotum
53                 webcookies
54                 webfs
55                 plumber
56                 rio
57         }
58 case con
59         prompt=('cpu% ' '       ')
60 }
61 !
62 cat > lib/plumbing <<!
63 # to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules
64
65 editor = sam
66 browser = mothra
67
68 include basic
69
70 !
71
72 . lib/profile