diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-04-11 19:47:05 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-04-11 19:47:05 +0000 |
commit | 45bab89362ebe122d60d5e9b1e2b949b26168db3 (patch) | |
tree | c430eb677a06d8c823fd1d2d4a9f7790c0c275d2 /sys/lib/dist.old/pc/inst/mainloop | |
parent | 05569f6f2c54a19c1c85a7f10742913cd8904787 (diff) |
livecd
Diffstat (limited to 'sys/lib/dist.old/pc/inst/mainloop')
-rwxr-xr-x | sys/lib/dist.old/pc/inst/mainloop | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/lib/dist.old/pc/inst/mainloop b/sys/lib/dist.old/pc/inst/mainloop new file mode 100755 index 000000000..94d58efc4 --- /dev/null +++ b/sys/lib/dist.old/pc/inst/mainloop @@ -0,0 +1,23 @@ +#!/bin/rc + +sleep 86400 & +cd /bin/inst +. defs +fn sigint { } + +coherence + +disks=`{ls /dev/sd*/data >[2]/dev/null | sed 's!/dev/(sd..)/data!\1!'} +for (i in /dev/sd*/data) + if(test -f $i) + disk/fdisk -p $i>`{basename -d $i}^/ctl >[2]/dev/null +for(i in /dev/sd*/plan9*) + if(test -f $i) + disk/prep -p $i >`{basename -d $i}^/ctl >[2]/dev/null + +# we run this while() here so that ctl-d won''t exit from us -- it''ll only exit main! +# main contains a while() loop too, to avoid the hit of +# continually reexecing from here. + +while() + main |