wm: infra

Download patch

ref: a26704b4f61f20077fda74e24dc3bcb2a3b2c143
parent: 78cf15bfd7355a83684e70506db6f3596ac793d9
author: mkf <mkf@cloud9p.org>
date: Tue Mar 19 05:36:58 EDT 2024

cfg/wm/service/*: import

--- /dev/null
+++ b/cfg/wm/service/!tcp22
@@ -1,0 +1,2 @@
+#!/bin/rc
+#exec /bin/aux/trampoline 'net!unix.cloud9p.org!ssh'
--- /dev/null
+++ b/cfg/wm/service/il17019
@@ -1,0 +1,11 @@
+#!/bin/rc
+if(~ $#* 3){
+	netdir=$3
+	remote=$2!`{cat $3/remote}
+}
+fn server {
+	~ $#remote 0 || echo -n $netdir $remote >/proc/$pid/args
+	rm -f /env/'fn#server'
+	. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
+}
+exec tlssrv -a /bin/rc -c server
--- /dev/null
+++ b/cfg/wm/service/il17031
@@ -1,0 +1,3 @@
+#!/bin/rc
+exec ramfs -i
+
--- /dev/null
+++ b/cfg/wm/service/startnfs
@@ -1,0 +1,7 @@
+#!/bin/rc
+Kill portmapper | rc
+Kill nfsserver | rc
+rm -f /srv/nfsserver.chat /srv/portmapper.chat
+aux/nfsserver -f /srv/grid.audio -c /lib/ndb/nfs >>[2] /sys/log/nfsserver
+aux/portmapper >>[2] /sys/log/portmapper
+aux/portmapper -t >>[2] /sys/log/portmapper
--- /dev/null
+++ b/cfg/wm/service/tcp17019
@@ -1,0 +1,11 @@
+#!/bin/rc
+if(~ $#* 3){
+	netdir=$3
+	remote=$2!`{cat $3/remote}
+}
+fn server {
+	~ $#remote 0 || echo -n $netdir $remote >/proc/$pid/args
+	rm -f /env/'fn#server'
+	. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
+}
+exec tlssrv -a /bin/rc -c server
--- /dev/null
+++ b/cfg/wm/service/tcp17020
@@ -1,0 +1,2 @@
+#!/bin/rc
+exec tlssrv -A /bin/aux/trampoline 'net!$fs!9fs'
--- /dev/null
+++ b/cfg/wm/service/tcp17021
@@ -1,0 +1,2 @@
+#!/bin/rc
+exec tlssrv -a /bin/git/serve -wr/usr/git
--- /dev/null
+++ b/cfg/wm/service/tcp443
@@ -1,0 +1,3 @@
+#!/bin/rc
+exec tlssrv -c/sys/lib/tls/acmed/cloud9p.org.crt -r`{cat $3/remote}\
+/bin/aux/trampoline net!wm!80>>[2]/sys/log/httpd/log
--- /dev/null
+++ b/cfg/wm/service/tcp53
@@ -1,0 +1,2 @@
+#!/bin/rc
+/bin/ndb/dnstcp $3
--- /dev/null
+++ b/cfg/wm/service/tcp565
@@ -1,0 +1,7 @@
+#!/bin/rc
+#whoami service net dir
+loc=`{cat $3/local|sed 's/!.*//'}
+rem=`{cat $3/remote}
+port=`{echo $rem|sed 's/^[^!]*!//'}
+rem=`{echo $rem|sed 's/!.*//'}
+echo i am $loc sysname $sysname you are $rem port $port
--- /dev/null
+++ b/cfg/wm/service/tcp70
@@ -1,0 +1,9 @@
+#!/bin/rc
+mount -c /srv/grid.ramfs /tmp
+
+execfs -m /usr/pub/math /cfg/wm/rules/math
+execfs -m /usr/pub/doc /cfg/wm/rules/doc
+
+bind -ac /usr/pub /usr/web
+
+exec /bin/tcp70 $3 >>[2]/sys/log/gopher
--- /dev/null
+++ b/cfg/wm/service/tcp7777
@@ -1,0 +1,2 @@
+#!/bin/rc
+wm/pasted /usr/pub/paste
--- /dev/null
+++ b/cfg/wm/service/tcp80
@@ -1,0 +1,14 @@
+#!/bin/rc
+mount -c /srv/grid.ramfs /tmp
+
+execfs -m /n/web /cfg/wm/rules/web
+# not to overlap with static content
+bind -a /n/web/ /usr/web
+
+execfs -m /usr/pub/math /cfg/wm/rules/math
+execfs -m /usr/pub/doc  /cfg/wm/rules/doc
+
+bind -b /sys/doc /usr/pub/doc/sys
+bind -b /usr/pub /usr/web
+
+exec /bin/tcp80 $3 >>[2]/sys/log/httpd/log
--- /dev/null
+++ b/cfg/wm/service/tcp900
@@ -1,0 +1,9 @@
+#!/bin/rc
+mount -c /srv/grid.ramfs /tmp
+
+execfs -m /usr/pub/doc /cfg/wm/rules/doc
+execfs -m /usr/pub/math /cfg/wm/rules/math
+execfs -m /usr/pub/http /cfg/wm/rules/httpfs
+
+mount -bc /srv/grid.chat /usr/pub
+exec exportfs -r /usr/pub
--- /dev/null
+++ b/cfg/wm/service/tcp901
@@ -1,0 +1,2 @@
+#!/bin/rc
+exec tlssrv -A /bin/aux/trampoline 'net!$sysname!900'
--- /dev/null
+++ b/cfg/wm/service/tcp9418
@@ -1,0 +1,2 @@
+#!/bin/rc
+git/serve -r /usr/git