1b017b8db4
this makes sure tcp boot will have ther user /tmp's the same way as from local cwfs. we used /srv/cwfs to prevent a deadlock with 9660srv as a root filesystem which has been fixed now.
70 lines
1.3 KiB
Bash
Executable file
70 lines
1.3 KiB
Bash
Executable file
#!/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 -qc /n/other/usr/$user/tmp $home/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
|
|
mount -qC /srv/boot /n/other other
|
|
bind -qc /n/other/usr/$x^user/tmp $x^home/tmp
|
|
bind -c $x^home/tmp /tmp
|
|
font=/lib/font/bit/vga/unicode.font
|
|
switch($x^service){
|
|
case terminal
|
|
webcookies
|
|
webfs
|
|
plumber
|
|
echo -n accelerated > '#m/mousectl'
|
|
echo -n 'res 3' > '#m/mousectl'
|
|
prompt=('term% ' ' ')
|
|
fn term%{ $x^* }
|
|
rio
|
|
case cpu
|
|
bind /mnt/term/dev/cons /dev/cons
|
|
bind -q /mnt/term/dev/consctl /dev/consctl
|
|
>[2] /dev/null {
|
|
cp /dev/sysname /mnt/term/dev/label
|
|
if(wsys=`{cat /mnt/term/env/wsys})
|
|
wsys=/mnt/term^$x^wsys
|
|
}
|
|
bind -a /mnt/term/dev /dev
|
|
prompt=('cpu% ' ' ')
|
|
fn cpu%{ $x^* }
|
|
if(! test -e /mnt/term/dev/wsys){
|
|
# call from drawterm
|
|
auth/factotum
|
|
webcookies
|
|
webfs
|
|
plumber
|
|
rio
|
|
}
|
|
case con
|
|
prompt=('cpu% ' ' ')
|
|
}
|
|
!
|
|
cat > lib/plumbing <<!
|
|
# to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules
|
|
|
|
editor = sam
|
|
browser = mothra
|
|
|
|
include basic
|
|
|
|
!
|
|
|
|
. lib/profile
|