merge
This commit is contained in:
commit
6a4063e245
3 changed files with 29 additions and 0 deletions
|
@ -59,6 +59,7 @@ fn ask {
|
|||
mt=()
|
||||
. /rc/lib/tcp.rc
|
||||
. /rc/lib/local.rc
|
||||
. /rc/lib/usb.rc
|
||||
|
||||
fn main{
|
||||
mp=()
|
||||
|
@ -146,6 +147,7 @@ if(! ~ $#kbmap 0){
|
|||
for(i in I l`{seq 0 3})
|
||||
bind -qa '#'$i /net
|
||||
|
||||
configusb # run partfs on usb disks
|
||||
configlocal # add partitions and binds
|
||||
|
||||
while(){
|
||||
|
|
24
sys/src/9/boot/usb.rc
Normal file
24
sys/src/9/boot/usb.rc
Normal file
|
@ -0,0 +1,24 @@
|
|||
fn configusb{
|
||||
for(c in /dev/sdU*[0-9]){
|
||||
d=`{echo $c | sed 's,^/dev/(.*),\1p,g'}
|
||||
if(! test -d /dev/$d)
|
||||
disk/partfs -d $d $c/data
|
||||
}
|
||||
}
|
||||
|
||||
fn connectusb{
|
||||
m=/mnt/usb
|
||||
if(! test -r $1)
|
||||
fatal device $1 does not exist
|
||||
if(! test -r $1/dos)
|
||||
fatal device $1 does not have dos partition
|
||||
mkdir -p $m
|
||||
dossrv -r -f $1/dos usb
|
||||
mount /srv/usb $m
|
||||
if(! test -r $m/9front.iso)
|
||||
fatal $m/9front.iso not found
|
||||
{9660srv -s -f $m/9front.iso &} <[0=1] | echo 0 >/srv/boot
|
||||
}
|
||||
|
||||
musb=(configusb connectusb)
|
||||
mt=(musb $mt)
|
|
@ -10,6 +10,7 @@ $cputype
|
|||
fdisk
|
||||
kfs
|
||||
prep
|
||||
partfs
|
||||
dossrv
|
||||
echo
|
||||
cwfs64x
|
||||
|
@ -19,6 +20,7 @@ $cputype
|
|||
ip
|
||||
ipconfig
|
||||
ls
|
||||
mkdir
|
||||
mount
|
||||
ramfs
|
||||
rc
|
||||
|
@ -38,6 +40,7 @@ rc
|
|||
rcmain
|
||||
local.rc 555 sys sys ../boot/local.rc
|
||||
tcp.rc 555 sys sys ../boot/tcp.rc
|
||||
usb.rc 555 sys sys ../boot/usb.rc
|
||||
bin
|
||||
fstype
|
||||
diskparts
|
||||
|
|
Loading…
Reference in a new issue