merge
This commit is contained in:
commit
6a4063e245
|
@ -59,6 +59,7 @@ fn ask {
|
||||||
mt=()
|
mt=()
|
||||||
. /rc/lib/tcp.rc
|
. /rc/lib/tcp.rc
|
||||||
. /rc/lib/local.rc
|
. /rc/lib/local.rc
|
||||||
|
. /rc/lib/usb.rc
|
||||||
|
|
||||||
fn main{
|
fn main{
|
||||||
mp=()
|
mp=()
|
||||||
|
@ -146,6 +147,7 @@ if(! ~ $#kbmap 0){
|
||||||
for(i in I l`{seq 0 3})
|
for(i in I l`{seq 0 3})
|
||||||
bind -qa '#'$i /net
|
bind -qa '#'$i /net
|
||||||
|
|
||||||
|
configusb # run partfs on usb disks
|
||||||
configlocal # add partitions and binds
|
configlocal # add partitions and binds
|
||||||
|
|
||||||
while(){
|
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
|
fdisk
|
||||||
kfs
|
kfs
|
||||||
prep
|
prep
|
||||||
|
partfs
|
||||||
dossrv
|
dossrv
|
||||||
echo
|
echo
|
||||||
cwfs64x
|
cwfs64x
|
||||||
|
@ -19,6 +20,7 @@ $cputype
|
||||||
ip
|
ip
|
||||||
ipconfig
|
ipconfig
|
||||||
ls
|
ls
|
||||||
|
mkdir
|
||||||
mount
|
mount
|
||||||
ramfs
|
ramfs
|
||||||
rc
|
rc
|
||||||
|
@ -38,6 +40,7 @@ rc
|
||||||
rcmain
|
rcmain
|
||||||
local.rc 555 sys sys ../boot/local.rc
|
local.rc 555 sys sys ../boot/local.rc
|
||||||
tcp.rc 555 sys sys ../boot/tcp.rc
|
tcp.rc 555 sys sys ../boot/tcp.rc
|
||||||
|
usb.rc 555 sys sys ../boot/usb.rc
|
||||||
bin
|
bin
|
||||||
fstype
|
fstype
|
||||||
diskparts
|
diskparts
|
||||||
|
|
Loading…
Reference in a new issue