net: Add a function to dump TCP's hash table
[akaros.git] / kern / kfs / mountroot
1 #!/bin/bash
2 #
3 # root [[REMOTE_NAME] [SRVNAME]]
4 #
5 # remote name: selects the UFS server/dialstring from your local configs
6 # srv name: optional name for the chan in #s
7 #
8 # when run with no args, this will mount ufs for qemu
9
10 DIALSTRING='tcp!10.0.2.2!1025'
11
12 REMOTE="qemu"
13 if [[ "$#" -ge "1" ]]
14 then
15         REMOTE=$1
16 fi
17
18 SRVNAME=$REMOTE-ufs
19 if [[ "$#" -ge "2" ]]
20 then
21         SRVNAME=$2
22 fi
23
24 # Given $REMOTE, override DIALSTRING.  Use something like this:
25 #
26 #if [ "x$REMOTE" = "xqemu" ]
27 #then
28 #       : #nothing
29 #elif [ "x$REMOTE" = "xSOMEHOST" ]
30 #then
31 #       DIALSTRING='tcp!SOMEIP!1025'
32 #else
33 #       echo "Unknown remote: $REMOTE!"
34 #       exit
35 #fi
36 [[ -f /etc/netmounts ]] && source /etc/netmounts
37
38 srv $DIALSTRING $SRVNAME
39
40 mount -a -c /srv/$SRVNAME /mnt