mainloop 532 B

1234567891011121314151617181920212223
  1. #!/bin/rc
  2. sleep 86400 &
  3. cd /bin/inst
  4. . defs
  5. fn sigint { }
  6. coherence
  7. disks=`{ls /dev/sd*/data >[2]/dev/null | sed 's!/dev/(sd..)/data!\1!'}
  8. for (i in /dev/sd*/data)
  9. if(test -f $i)
  10. disk/fdisk -p $i>`{basename -d $i}^/ctl >[2]/dev/null
  11. for(i in /dev/sd*/plan9*)
  12. if(test -f $i)
  13. disk/prep -p $i >`{basename -d $i}^/ctl >[2]/dev/null
  14. # we run this while() here so that ctl-d won''t exit from us -- it''ll only exit main!
  15. # main contains a while() loop too, to avoid the hit of
  16. # continually reexecing from here.
  17. while()
  18. main