]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/pc/bootfloppy
perms perms perms...
[plan9front.git] / rc / bin / pc / bootfloppy
1 #!/bin/rc
2
3 if(~ $#* 0 1) {
4         echo 'usage: bootfloppy /dev/fd0disk plan9.ini [files...]'>[1=2]
5         exit usage
6 }
7
8 if(! test -f $2) {
9         echo $2 does not exist >[1=2]
10         exit noplan9.ini
11 }
12
13 disk=$1
14 ini=$2
15 shift 
16 shift
17
18 mkdir /tmp/bootfloppy.$pid
19 cp $ini /tmp/bootfloppy.$pid/plan9.ini
20 dd -bs 512 -count 1 < /dev/zero >/tmp/bootfloppy.$pid/plan9.nvr
21 disk/format -b /386/pbs -f -d $disk /386/9load /tmp/bootfloppy.$pid/* $*
22 rm -rf /tmp/bootfloppy.$pid