From 1de9ca2de54d8f57557c4a4fa5994bac8ddec2fd Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 3 May 2012 10:47:40 +0200 Subject: bring back il protocol support --- sys/src/9/boot/bootrc | 8 ++++---- sys/src/9/boot/net.rc | 25 +++++++++++++++++++++++++ sys/src/9/boot/tcp.rc | 24 ------------------------ 3 files changed, 29 insertions(+), 28 deletions(-) create mode 100755 sys/src/9/boot/net.rc delete mode 100755 sys/src/9/boot/tcp.rc (limited to 'sys/src/9/boot') diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc index c2b1bbf63..3057df5cb 100644 --- a/sys/src/9/boot/bootrc +++ b/sys/src/9/boot/bootrc @@ -54,7 +54,7 @@ fn ask { } mt=() -. /rc/lib/tcp.rc +. /rc/lib/net.rc . /rc/lib/local.rc fn main{ @@ -63,7 +63,7 @@ fn main{ if(~ $#nobootprompt 0){ echo showlocaldevs - ask bootargs ' is (tcp, local!device)' $"bootargs + ask bootargs ' is (tcp, il, local!device)' $"bootargs } if not bootargs=$nobootprompt nobootprompt=() @@ -92,8 +92,8 @@ fn main{ } if not x=($x -u) - if(! ~ $#authaddr 0) - x=($x -a $authaddr) + if(! ~ $#auth 0) + x=($x -a $auth) if(! ~ $#debugfactotum 0) x=($x -p) must $x diff --git a/sys/src/9/boot/net.rc b/sys/src/9/boot/net.rc new file mode 100755 index 000000000..946361027 --- /dev/null +++ b/sys/src/9/boot/net.rc @@ -0,0 +1,25 @@ +#!/bin/rc + +fn confignet{ + must ip/ipconfig -p $* + if(~ $#fs 0) + fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb} + if(~ $#auth 0) + auth=`{awk -F'=' '/auth=/{print $2; exit}' /net/ndb} + if(~ $#fs 0) + ask fs ' ip is?' $auth + if(~ $#auth 0) + ask auth ' ip is?' $fs +} + +fn connecttcp{ + srv -q tcp!$fs!564 boot +} + +fn connectil{ + srv -q il!$fs!17008 boot +} + +mtcp=(confignet connecttcp) +mil=(confignet connectil) +mt=(mtcp mil $mt) diff --git a/sys/src/9/boot/tcp.rc b/sys/src/9/boot/tcp.rc deleted file mode 100755 index 63a6b56c5..000000000 --- a/sys/src/9/boot/tcp.rc +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/rc - -fn configtcp{ - must ip/ipconfig -p $* - - if(~ $#fs 0) - fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb} - if(~ $#auth 0) - auth=`{awk -F'=' '/auth=/{print $2; exit}' /net/ndb} - if(~ $#fs 0) - ask fs ' ip is?' $auth - if(~ $#auth 0) - ask auth ' ip is?' $fs - - fsaddr=tcp!$fs!564 - authaddr=tcp!$auth!567 -} - -fn connecttcp{ - srv -q $"fsaddr boot -} - -mtcp=(configtcp connecttcp) -mt=(mtcp $mt) -- cgit v1.2.3