boot 773 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/boot/rc -m /boot/rcmain
  2. cpuserver=no
  3. cd /boot
  4. cp '#r/rtc' '#c/time'
  5. bind -a '#I' /net
  6. bind -a '#l0' /net
  7. bind -a '#S' /dev
  8. bind '#p' /proc
  9. bind '#d' /fd
  10. bind -a /boot /
  11. ipconfig loopback /dev/null 127.1
  12. if(~ $cpuserver yes){
  13. factotum -sfactotum -S
  14. }
  15. if not{
  16. factotum -sfactotum -u
  17. # add a key so mount and fossil can authenticate each other
  18. # remove this key once factotum is initialized with other keys
  19. factotum -g 'proto=p9sk1 user=rsc dom=localhost !password=localhost'
  20. }
  21. venti -c venti.conf -B 1m -C 1m -h tcp!127.1!8000 -I 1m -w -a tcp!127.1!17034 &
  22. sleep 10
  23. venti=tcp!127.0.0.1!17034
  24. fossil -c '. flproto'
  25. mount -c /srv/boot /root
  26. bind -ac /root /
  27. rootdir=/root
  28. rootspec=''
  29. if(~ $cpuserver yes)
  30. /386/init -c
  31. if not
  32. /386/init -t
  33. exec ./rc -m/boot/rcmain -i