2011-03-30 13:53:33 +00:00
|
|
|
#!/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='$'
|
2022-04-13 13:53:12 +00:00
|
|
|
mkdir bin bin/rc bin/mips bin/386 bin/amd64 bin/power bin/arm bin/arm64
|
2011-03-30 13:53:33 +00:00
|
|
|
mkdir lib tmp
|
|
|
|
chmod +t tmp
|
2011-06-09 05:39:52 +00:00
|
|
|
bind -qc /n/other/usr/$user/tmp $home/tmp
|
2011-03-30 13:53:33 +00:00
|
|
|
bind -c $home/tmp /tmp
|
|
|
|
mail -c
|
|
|
|
auth/cron -c
|
|
|
|
|
|
|
|
cat > lib/profile <<!
|
2014-02-02 09:59:05 +00:00
|
|
|
bind -qa $x^home/bin/rc /bin
|
|
|
|
bind -qa $x^home/bin/$x^cputype /bin
|
2012-04-09 16:01:02 +00:00
|
|
|
font=/lib/font/bit/vga/unicode.font
|
2011-03-30 13:53:33 +00:00
|
|
|
switch($x^service){
|
|
|
|
case terminal
|
2012-01-11 15:17:54 +00:00
|
|
|
webcookies
|
|
|
|
webfs
|
2011-03-30 13:53:33 +00:00
|
|
|
plumber
|
|
|
|
echo -n accelerated > '#m/mousectl'
|
|
|
|
echo -n 'res 3' > '#m/mousectl'
|
|
|
|
prompt=('term% ' ' ')
|
|
|
|
fn term%{ $x^* }
|
2012-08-17 16:19:03 +00:00
|
|
|
rio
|
2011-03-30 13:53:33 +00:00
|
|
|
case cpu
|
|
|
|
bind /mnt/term/dev/cons /dev/cons
|
2012-08-17 16:19:03 +00:00
|
|
|
bind -q /mnt/term/dev/consctl /dev/consctl
|
|
|
|
>[2] /dev/null {
|
|
|
|
cp /dev/sysname /mnt/term/dev/label
|
2022-04-13 13:53:12 +00:00
|
|
|
if(wsys=`{cat /mnt/term/env/wsys} && ~ $x^#wsys 1) {
|
2012-08-17 16:19:03 +00:00
|
|
|
wsys=/mnt/term^$x^wsys
|
2022-04-13 13:53:12 +00:00
|
|
|
}
|
|
|
|
if not {
|
|
|
|
wsys=()
|
|
|
|
}
|
2012-08-17 16:19:03 +00:00
|
|
|
}
|
2011-03-30 13:53:33 +00:00
|
|
|
bind -a /mnt/term/dev /dev
|
|
|
|
prompt=('cpu% ' ' ')
|
|
|
|
fn cpu%{ $x^* }
|
2012-08-17 16:19:03 +00:00
|
|
|
if(! test -e /mnt/term/dev/wsys){
|
|
|
|
# call from drawterm
|
2013-10-23 21:44:25 +00:00
|
|
|
if(test -e /mnt/term/dev/secstore){
|
|
|
|
auth/factotum -n
|
|
|
|
read -m /mnt/term/dev/secstore >/mnt/factotum/ctl
|
|
|
|
echo >/mnt/term/dev/secstore
|
|
|
|
}
|
|
|
|
if not
|
|
|
|
auth/factotum
|
2012-08-17 16:19:03 +00:00
|
|
|
webcookies
|
|
|
|
webfs
|
|
|
|
plumber
|
|
|
|
rio
|
2011-03-30 13:53:33 +00:00
|
|
|
}
|
|
|
|
case con
|
|
|
|
prompt=('cpu% ' ' ')
|
|
|
|
}
|
|
|
|
!
|
|
|
|
cat > lib/plumbing <<!
|
|
|
|
# to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules
|
|
|
|
|
2011-10-08 03:01:14 +00:00
|
|
|
editor = sam
|
|
|
|
browser = mothra
|
2011-03-30 13:53:33 +00:00
|
|
|
|
|
|
|
include basic
|
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
. lib/profile
|