shithub: privategrid

Download patch

ref: ae717e651051cac1548c988909186e91d5349673
parent: 3c11f684f57bbd145b472a9cd3aa1a5dbb28713f
author: glenda <glenda@9front.local>
date: Wed Dec 2 21:19:49 EST 2020

moved stuff around and added some of the initial scripts - still not running

--- a/01infernostart
+++ /dev/null
@@ -1,8 +1,0 @@
-#!/bin/rc
-
-cd $home/inferno-os/Plan9/386/bin
-hubfs -s regemu
-mount -c /srv/regemu /n/hubfs
-touch /n/hubfs/regemu0 /n/hubfs/regemu1 /n/hubfs/regemu2
-emu </n/hubfs/regemu0 >>/n/hubfs/regemu1 >>[2]/n/hubfs/regemu2 &
-cd
--- a/02infregstart
+++ /dev/null
@@ -1,12 +1,0 @@
-#!/bin/rc
-
-mount -c /srv/regemu /n/reghub
-echo 'bind -c ''#₪'' /srv
-mount -A -c {ndb/registry} /mnt/registry
-9srvfs registry /mnt/registry &
-mount -A -c {ndb/registry} /n/registry
-9srvfs pubregistry /n/registry &
-' >>/n/reghub/regemu0
-sleep 2
-chmod 666 /srv/registry
-chmod 666 /srv/pubregistry
--- a/03regreg
+++ /dev/null
@@ -1,18 +1,0 @@
-#!/bin/rc
-
-myip=107.191.50.176
-auth/factotum
-echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-mount -c /srv/registry /mnt/registry
-hub -b listenreg
-mount /srv/listenreg /n/listenreg
-echo 'gridlisten1 -v -d gridregistry -m /mnt/registry tcp!*!6675 /bin/exportfs -R -S /srv/registry' >>/n/listenreg/io0
-hub -b listenpubreg
-mount /srv/listenpubreg /n/listenpubreg
-echo 'gridlisten1 -v -d pubregistry -m /n/pubregistry tcp!*!7675 /bin/exportfs -S /srv/pubregistry' >>/n/listenpubreg/io0
-hub -b listenregtls
-mount /srv/listenregtls /n/listenregtls
-echo 'gridlisten1 -tv -d gridregistry -m /mnt/registry tcp!*!16675 tlssrv -A /bin/aux/trampoline tcp!127.1!6675' >>/n/listenregtls/io0
-hub -b listenpubregtls
-mount /srv/listenpubregtls /n/listenpubregtls
-echo 'gridlisten1 -tv -d pubregistry -m /n/pubregistry tcp!*!17675 tlssrv -A /bin/aux/trampoline tcp!127.1!7675' >> /n/listenpubregtls/io0
--- a/04chat
+++ /dev/null
@@ -1,19 +1,0 @@
-#!/bin/rc
-
-myip=107.191.50.176
-auth/factotum
-echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-mount -c /srv/registry /mnt/registry
-cd $home/gridmods
-8.safehubfs -s gridchat
-chmod 666 /srv/gridchat
-mount -c /srv/gridchat /n/gridchat
-cd /n/gridchat
-touch chat gridhelp plan9 chanstuff
-cd
-hub -b listenchat
-mount /srv/listenchat /n/listenchat
-echo 'gridlisten1 -v -d gridchat -m /n/chat tcp!*!9997 /bin/exportfs -S /srv/gridchat' >>/n/listenchat/io0
-hub -b listenchattls
-mount /srv/listenchattls /n/listenchattls
-echo 'gridlisten1 -tv -d gridchat -m /n/chat tcp!*!19997 tlssrv -A /bin/aux/trampoline tcp!127.1!9997' >>/n/listenchattls/io0
--- a/05wiki
+++ /dev/null
@@ -1,15 +1,0 @@
-#!/bin/rc
-
-#myip=45.76.22.6
-rimport -a cpu32 /srv
-mount -c /srv/registry /mnt/registry
-auth/factotum
-#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-wikifs -p 666 -s gridwiki /sys/lib/wiki
-ip/httpd/httpd
-hub -b listenwiki
-mount /srv/listenwiki /n/listenwiki
-echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!17035 /bin/exportfs -S /srv/gridwiki' >>/n/listenwiki/io0
-hub -b listenwikitls
-mount /srv/listenwikitls /n/listenwikitls
-echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!27035 tlssrv -A /bin/aux/trampoline tcp!127.1!17035' >>/n/listenwikitls/io0
--- a/06ramfs
+++ /dev/null
@@ -1,15 +1,0 @@
-#!/bin/rc
-
-#myip=45.76.231.117
-rimport -a cpu32 /srv
-mount -c /srv/registry /mnt/registry
-#auth/factotum
-#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-ramfs -S gridram
-chmod 666 /srv/gridram
-hub -b listengridram
-mount /srv/listengridram /n/listengridram
-echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!9996 /bin/exportfs -S /srv/gridram' >>/n/listengridram/io0
-hub -b listengridramtls
-mount /srv/listengridramtls /n/listengridramtls
-echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!19996 tlssrv -A /bin/aux/trampoline tcp!127.1!9996' >>/n/listengridramtls/io0
--- a/07gridroot
+++ /dev/null
@@ -1,14 +1,0 @@
-#!/bin/rc
-
-#myip=45.63.75.148
-rimport -a cpu32 /srv /n/regsrv
-mount -c /n/regsrv/registry /mnt/registry
-srvfs -p 666 registry /mnt/registry
-auth/factotum
-#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-hub -b listenroot
-mount /srv/listenroot /n/listenroot
-echo 'gridlisten1 -v -d gridroot -m /n/gridroot tcp!*!564 /bin/exportfs -R -S /srv/boot' >>/n/listenroot/io0
-hub -b listenroottls
-mount /srv/listenroottls /n/listenroottls
-echo 'gridlisten1 -tv -d gridroot -m /n/gridroot tcp!*!10564 tlssrv -A /bin/aux/trampoline tcp!127.1!564' >>/n/listenroottls/io0
--- a/08ftp
+++ /dev/null
@@ -1,9 +1,0 @@
-#!/bin/rc
-
-myip=45.76.231.117
-rimport -a cpu32 /srv
-mount -c /srv/registry /mnt/registry
-hub -b listenftp
-mount /srv/listenftp /n/listenftp
-echo 'gridlisten1 -tv -d gridftp -m /n/gridftp tcp!*!10021 /bin/ip/lftpd -Ae' >>/n/listenftp/io0
-
--- a/09plumber
+++ /dev/null
@@ -1,25 +1,0 @@
-#!/bin/rc
-
-#myip=107.191.50.176
-rimport -a cpu64 /srv
-mount -c /srv/registry /mnt/registry
-mount /srv/gridram /n/gridram
-mount /srv/boot /n/gridroot
-auth/factotum
-#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-#echo 'none
-#none
-#' | ftpfs tcp!cpu64!10021
-bind -c /n/ftp/incoming /n/gridftp
-bind  /usr/none/incoming /n/griddisk
-bind  /usr/none/incoming /n/gridftp
-cd $home/gridmods
-hub -b listenplumber
-mount /srv/listenplumber /n/listenplumber
-echo 'safeplumber/8.plumber -p gridplumbrules' >>/n/listenplumber/io0
-sleep 1
-chmod 666 /srv/plumb.glenda*
-echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!9998 /bin/exportfs -S ' /srv/plumb.glenda* >>/n/listenplumber/io0
-hub -b listenplumbertls
-mount /srv/listenplumbertls /n/listenplumbertls
-echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!19998 tlssrv -A /bin/aux/trampoline tcp!127.1!9998' >>/n/listenplumbertls/io0
--- a/11griddisk
+++ /dev/null
@@ -1,14 +1,0 @@
-#!/bin/rc
-
-#rimport -a $regip /srv /n/regsrv
-#mount -c /n/regsrv/registry /mnt/registry
-#srvfs -p 666 registry /mnt/registry
-mount -c /srv/registry /mnt/registry
-auth/factotum
-#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
-hub -b listendisk
-mount /srv/listendisk /n/listendisk
-echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!9564 /bin/exportfs -r /usr/none/incoming' >>/n/listendisk/io0
-hub -b listendisktls
-mount /srv/listendisktls /n/listendisktls
-echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!19564 tlssrv -A /bin/aux/trampoline tcp!127.1!9564' >>/n/listendisktls/io0
--- /dev/null
+++ b/griddisk
@@ -1,0 +1,10 @@
+#! /bin/rc
+if($allownotls){
+	hub -b listendisk
+	mount /srv/listendisk /n/listendisk
+	echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!9564 /bin/
+	exportfs -r /usr/none/incoming' >>/n/listendisk/io0
+}
+hub -b listendisktls
+mount /srv/listendisktls /n/listendisktls
+echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!19564 tlssrv -A /bin/aux/trampoline tcp!127.1!9564' >>/n/listendisktls/io0
\ No newline at end of file
--- /dev/null
+++ b/gridplumb
@@ -1,0 +1,13 @@
+#!/bin/rc
+cd $home/gridmods
+if($allownotls){
+	hub -b listenplumber
+	mount /srv/listenplumber /n/listenplumber
+	echo 'safeplumber/8.plumber -p gridplumbrules' >>/n/listenplumber/io0
+	sleep 1
+	chmod 666 /srv/plumb.glenda*
+	echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!9998 /bin/exportfs -S ' /srv/plumb.glenda* >>/n/listenplumber/io0
+}
+hub -b listenplumbertls
+mount /srv/listenplumbertls /n/listenplumbertls
+echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!19998 tlssrv -A /bin/aux/trampoline tcp!127.1!9998' >>/n/listenplumbertls/io0
--- /dev/null
+++ b/gridstart/01infernostart
@@ -1,0 +1,8 @@
+#!/bin/rc
+
+cd $home/inferno-os/Plan9/386/bin
+hubfs -s regemu
+mount -c /srv/regemu /n/hubfs
+touch /n/hubfs/regemu0 /n/hubfs/regemu1 /n/hubfs/regemu2
+emu </n/hubfs/regemu0 >>/n/hubfs/regemu1 >>[2]/n/hubfs/regemu2 &
+cd
--- /dev/null
+++ b/gridstart/02infregstart
@@ -1,0 +1,12 @@
+#!/bin/rc
+
+mount -c /srv/regemu /n/reghub
+echo 'bind -c ''#₪'' /srv
+mount -A -c {ndb/registry} /mnt/registry
+9srvfs registry /mnt/registry &
+mount -A -c {ndb/registry} /n/registry
+9srvfs pubregistry /n/registry &
+' >>/n/reghub/regemu0
+sleep 2
+chmod 666 /srv/registry
+chmod 666 /srv/pubregistry
--- /dev/null
+++ b/gridstart/03regreg
@@ -1,0 +1,18 @@
+#!/bin/rc
+
+myip=107.191.50.176
+auth/factotum
+echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+mount -c /srv/registry /mnt/registry
+hub -b listenreg
+mount /srv/listenreg /n/listenreg
+echo 'gridlisten1 -v -d gridregistry -m /mnt/registry tcp!*!6675 /bin/exportfs -R -S /srv/registry' >>/n/listenreg/io0
+hub -b listenpubreg
+mount /srv/listenpubreg /n/listenpubreg
+echo 'gridlisten1 -v -d pubregistry -m /n/pubregistry tcp!*!7675 /bin/exportfs -S /srv/pubregistry' >>/n/listenpubreg/io0
+hub -b listenregtls
+mount /srv/listenregtls /n/listenregtls
+echo 'gridlisten1 -tv -d gridregistry -m /mnt/registry tcp!*!16675 tlssrv -A /bin/aux/trampoline tcp!127.1!6675' >>/n/listenregtls/io0
+hub -b listenpubregtls
+mount /srv/listenpubregtls /n/listenpubregtls
+echo 'gridlisten1 -tv -d pubregistry -m /n/pubregistry tcp!*!17675 tlssrv -A /bin/aux/trampoline tcp!127.1!7675' >> /n/listenpubregtls/io0
--- /dev/null
+++ b/gridstart/04chat
@@ -1,0 +1,19 @@
+#!/bin/rc
+
+myip=107.191.50.176
+auth/factotum
+echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+mount -c /srv/registry /mnt/registry
+cd $home/gridmods
+8.safehubfs -s gridchat
+chmod 666 /srv/gridchat
+mount -c /srv/gridchat /n/gridchat
+cd /n/gridchat
+touch chat gridhelp plan9 chanstuff
+cd
+hub -b listenchat
+mount /srv/listenchat /n/listenchat
+echo 'gridlisten1 -v -d gridchat -m /n/chat tcp!*!9997 /bin/exportfs -S /srv/gridchat' >>/n/listenchat/io0
+hub -b listenchattls
+mount /srv/listenchattls /n/listenchattls
+echo 'gridlisten1 -tv -d gridchat -m /n/chat tcp!*!19997 tlssrv -A /bin/aux/trampoline tcp!127.1!9997' >>/n/listenchattls/io0
--- /dev/null
+++ b/gridstart/05wiki
@@ -1,0 +1,15 @@
+#!/bin/rc
+
+#myip=45.76.22.6
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+wikifs -p 666 -s gridwiki /sys/lib/wiki
+ip/httpd/httpd
+hub -b listenwiki
+mount /srv/listenwiki /n/listenwiki
+echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!17035 /bin/exportfs -S /srv/gridwiki' >>/n/listenwiki/io0
+hub -b listenwikitls
+mount /srv/listenwikitls /n/listenwikitls
+echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!27035 tlssrv -A /bin/aux/trampoline tcp!127.1!17035' >>/n/listenwikitls/io0
--- /dev/null
+++ b/gridstart/06ramfs
@@ -1,0 +1,15 @@
+#!/bin/rc
+
+#myip=45.76.231.117
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+#auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+ramfs -S gridram
+chmod 666 /srv/gridram
+hub -b listengridram
+mount /srv/listengridram /n/listengridram
+echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!9996 /bin/exportfs -S /srv/gridram' >>/n/listengridram/io0
+hub -b listengridramtls
+mount /srv/listengridramtls /n/listengridramtls
+echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!19996 tlssrv -A /bin/aux/trampoline tcp!127.1!9996' >>/n/listengridramtls/io0
--- /dev/null
+++ b/gridstart/07gridroot
@@ -1,0 +1,14 @@
+#!/bin/rc
+
+#myip=45.63.75.148
+rimport -a cpu32 /srv /n/regsrv
+mount -c /n/regsrv/registry /mnt/registry
+srvfs -p 666 registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+hub -b listenroot
+mount /srv/listenroot /n/listenroot
+echo 'gridlisten1 -v -d gridroot -m /n/gridroot tcp!*!564 /bin/exportfs -R -S /srv/boot' >>/n/listenroot/io0
+hub -b listenroottls
+mount /srv/listenroottls /n/listenroottls
+echo 'gridlisten1 -tv -d gridroot -m /n/gridroot tcp!*!10564 tlssrv -A /bin/aux/trampoline tcp!127.1!564' >>/n/listenroottls/io0
--- /dev/null
+++ b/gridstart/08ftp
@@ -1,0 +1,9 @@
+#!/bin/rc
+
+myip=45.76.231.117
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+hub -b listenftp
+mount /srv/listenftp /n/listenftp
+echo 'gridlisten1 -tv -d gridftp -m /n/gridftp tcp!*!10021 /bin/ip/lftpd -Ae' >>/n/listenftp/io0
+
--- /dev/null
+++ b/gridstart/09plumber
@@ -1,0 +1,25 @@
+#!/bin/rc
+
+#myip=107.191.50.176
+rimport -a cpu64 /srv
+mount -c /srv/registry /mnt/registry
+mount /srv/gridram /n/gridram
+mount /srv/boot /n/gridroot
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+#echo 'none
+#none
+#' | ftpfs tcp!cpu64!10021
+bind -c /n/ftp/incoming /n/gridftp
+bind  /usr/none/incoming /n/griddisk
+bind  /usr/none/incoming /n/gridftp
+cd $home/gridmods
+hub -b listenplumber
+mount /srv/listenplumber /n/listenplumber
+echo 'safeplumber/8.plumber -p gridplumbrules' >>/n/listenplumber/io0
+sleep 1
+chmod 666 /srv/plumb.glenda*
+echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!9998 /bin/exportfs -S ' /srv/plumb.glenda* >>/n/listenplumber/io0
+hub -b listenplumbertls
+mount /srv/listenplumbertls /n/listenplumbertls
+echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!19998 tlssrv -A /bin/aux/trampoline tcp!127.1!9998' >>/n/listenplumbertls/io0
--- /dev/null
+++ b/gridstart/11griddisk
@@ -1,0 +1,14 @@
+#!/bin/rc
+
+#rimport -a $regip /srv /n/regsrv
+#mount -c /n/regsrv/registry /mnt/registry
+#srvfs -p 666 registry /mnt/registry
+mount -c /srv/registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+hub -b listendisk
+mount /srv/listendisk /n/listendisk
+echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!9564 /bin/exportfs -r /usr/none/incoming' >>/n/listendisk/io0
+hub -b listendisktls
+mount /srv/listendisktls /n/listendisktls
+echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!19564 tlssrv -A /bin/aux/trampoline tcp!127.1!9564' >>/n/listendisktls/io0
--- /dev/null
+++ b/user-scripts/connect
@@ -1,0 +1,15 @@
+#! /bin/rc -e
+if($1){
+	url=$1
+}
+if not{
+	echo 'usage grid/connect [url]'
+	exit 'bad usage'
+}
+srv -c tcp!$url!19564 $name^disk /n/$name^disk
+srv -c tcp!$url! $name^ram /n/$name^ram
+srv -c tcp!$url! $name^plumb /mnt/plumb
+
+if (test /n/$name^disk/init){
+	/n/$name^disk/init
+}