lib/profile: remove startupasfs, start rio as subprocess so we drop to rc if it fails (no framebuffer), drawterm
This commit is contained in:
parent
31ed86ce23
commit
8b93667775
2 changed files with 21 additions and 36 deletions
26
sys/lib/dist/usr/glenda/lib/profile
vendored
26
sys/lib/dist/usr/glenda/lib/profile
vendored
|
@ -6,38 +6,28 @@ bind -c $home/tmp /tmp
|
||||||
if(! syscall create /tmp/xxx 1 0666 >[2]/dev/null)
|
if(! syscall create /tmp/xxx 1 0666 >[2]/dev/null)
|
||||||
ramfs # in case we're running off a cd
|
ramfs # in case we're running off a cd
|
||||||
font=/lib/font/bit/vga/unicode.font
|
font=/lib/font/bit/vga/unicode.font
|
||||||
fn cd { builtin cd $* && awd } # for acme
|
|
||||||
switch($service){
|
switch($service){
|
||||||
case terminal
|
case terminal
|
||||||
if(! test -w $home/lib/webcookies){
|
if(! webcookies >[2]/dev/null)
|
||||||
touch /tmp/webcookies
|
|
||||||
webcookies -f /tmp/webcookies
|
webcookies -f /tmp/webcookies
|
||||||
}
|
|
||||||
if not {
|
|
||||||
webcookies
|
|
||||||
}
|
|
||||||
webfs
|
webfs
|
||||||
plumber
|
plumber
|
||||||
echo -n accelerated > '#m/mousectl'
|
echo -n accelerated > '#m/mousectl'
|
||||||
echo -n 'res 3' > '#m/mousectl'
|
echo -n 'res 3' > '#m/mousectl'
|
||||||
prompt=('term% ' ' ')
|
prompt=('term% ' ' ')
|
||||||
fn term%{ $* }
|
fn term%{ $* }
|
||||||
exec rio -i riostart
|
rio -i riostart
|
||||||
case cpu
|
case cpu
|
||||||
if (test -e /mnt/term/mnt/wsys) { # rio already running
|
|
||||||
bind -a /mnt/term/mnt/wsys /dev
|
|
||||||
if(test -w /dev/label)
|
|
||||||
echo -n $sysname > /dev/label
|
|
||||||
}
|
|
||||||
bind /mnt/term/dev/cons /dev/cons
|
bind /mnt/term/dev/cons /dev/cons
|
||||||
bind /mnt/term/dev/consctl /dev/consctl
|
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^$wsys
|
||||||
|
}
|
||||||
bind -a /mnt/term/dev /dev
|
bind -a /mnt/term/dev /dev
|
||||||
prompt=('cpu% ' ' ')
|
prompt=('cpu% ' ' ')
|
||||||
fn cpu%{ $* }
|
fn cpu%{ $* }
|
||||||
if (! test -e /mnt/term/mnt/wsys) { # cpu call from drawterm
|
|
||||||
font=/lib/font/bit/vga/unicode.font
|
|
||||||
exec rio
|
|
||||||
}
|
|
||||||
case con
|
case con
|
||||||
prompt=('cpu% ' ' ')
|
prompt=('cpu% ' ' ')
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,6 @@ cd $home
|
||||||
x='$'
|
x='$'
|
||||||
mkdir bin bin/rc bin/mips bin/386 bin/power bin/arm
|
mkdir bin bin/rc bin/mips bin/386 bin/power bin/arm
|
||||||
mkdir lib tmp
|
mkdir lib tmp
|
||||||
touch lib/webcookies
|
|
||||||
chmod 600 lib/webcookies
|
|
||||||
chmod +t tmp
|
chmod +t tmp
|
||||||
bind -qc /n/other/usr/$user/tmp $home/tmp
|
bind -qc /n/other/usr/$user/tmp $home/tmp
|
||||||
bind -c $home/tmp /tmp
|
bind -c $home/tmp /tmp
|
||||||
|
@ -30,35 +28,32 @@ case terminal
|
||||||
webcookies
|
webcookies
|
||||||
webfs
|
webfs
|
||||||
plumber
|
plumber
|
||||||
startupasfs
|
|
||||||
echo -n accelerated > '#m/mousectl'
|
echo -n accelerated > '#m/mousectl'
|
||||||
echo -n 'res 3' > '#m/mousectl'
|
echo -n 'res 3' > '#m/mousectl'
|
||||||
prompt=('term% ' ' ')
|
prompt=('term% ' ' ')
|
||||||
fn term%{ $x^* }
|
fn term%{ $x^* }
|
||||||
exec rio
|
rio
|
||||||
case cpu
|
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/cons /dev/cons
|
||||||
bind /mnt/term/dev/consctl /dev/consctl
|
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
|
bind -a /mnt/term/dev /dev
|
||||||
prompt=('cpu% ' ' ')
|
prompt=('cpu% ' ' ')
|
||||||
fn cpu%{ $x^* }
|
fn cpu%{ $x^* }
|
||||||
startupasfs
|
if(! test -e /mnt/term/dev/wsys){
|
||||||
if (! test -e /mnt/term/mnt/wsys) {
|
# call from drawterm
|
||||||
# cpu call from drawterm
|
|
||||||
font=/lib/font/bit/vga/unicode.font
|
|
||||||
plumber
|
|
||||||
auth/factotum
|
auth/factotum
|
||||||
exec rio
|
webcookies
|
||||||
|
webfs
|
||||||
|
plumber
|
||||||
|
rio
|
||||||
}
|
}
|
||||||
case con
|
case con
|
||||||
prompt=('cpu% ' ' ')
|
prompt=('cpu% ' ' ')
|
||||||
startupasfs
|
|
||||||
}
|
}
|
||||||
!
|
!
|
||||||
cat > lib/plumbing <<!
|
cat > lib/plumbing <<!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue