newuser script

This commit is contained in:
xfnw 2022-04-16 22:17:11 -04:00
parent 5e89dcb387
commit ada39fd98c

View file

@ -20,6 +20,7 @@ cat > lib/profile <<!
bind -qa $x^home/bin/rc /bin bind -qa $x^home/bin/rc /bin
bind -qa $x^home/bin/$x^cputype /bin bind -qa $x^home/bin/$x^cputype /bin
font=/lib/font/bit/vga/unicode.font font=/lib/font/bit/vga/unicode.font
fn mothra { /bin/mothra -a $* }
switch($x^service){ switch($x^service){
case terminal case terminal
webcookies webcookies
@ -29,7 +30,7 @@ case terminal
echo -n 'res 3' > '#m/mousectl' echo -n 'res 3' > '#m/mousectl'
prompt=('term% ' ' ') prompt=('term% ' ' ')
fn term%{ $x^* } fn term%{ $x^* }
rio rio -sb -i riostart
case cpu case cpu
bind /mnt/term/dev/cons /dev/cons bind /mnt/term/dev/cons /dev/cons
bind -q /mnt/term/dev/consctl /dev/consctl bind -q /mnt/term/dev/consctl /dev/consctl
@ -46,6 +47,8 @@ case cpu
prompt=('cpu% ' ' ') prompt=('cpu% ' ' ')
fn cpu%{ $x^* } fn cpu%{ $x^* }
if(! test -e /mnt/term/dev/wsys){ if(! test -e /mnt/term/dev/wsys){
prompt=('draw% ' ' ')
fn draw%{ $x^* }
# call from drawterm # call from drawterm
if(test -e /mnt/term/dev/secstore){ if(test -e /mnt/term/dev/secstore){
auth/factotum -n auth/factotum -n
@ -57,12 +60,20 @@ case cpu
webcookies webcookies
webfs webfs
plumber plumber
rio rio -sb -i riostart
} }
case con case con
prompt=('cpu% ' ' ') prompt=('cpu% ' ' ')
} }
! !
cat > bin/rc/riostart <<!
#!/bin/rc
window 0,0,161,61 stats -lm
window -miny 130
# run a system shell on the serial console
~ $#console 0 || window -scroll console
!
cat > lib/plumbing <<! cat > lib/plumbing <<!
# to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules # to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules