ref: 7fa8b48d8ee308ed95106f66d9376a79942c0080
parent: 8b3ea55d7a984e1241b211036a42ee62392616d5
author: Jacob Moody <moody@posixcafe.org>
date: Sun Apr 3 17:54:19 EDT 2022
provide some namespacing suggestions and mkfile
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,6 @@
+install:V:
+ mkdir -p /rc/bin/rc-gemd/handlers
+ cp rc-gemd /rc/bin/rc-gemd/
+ cp select-handler /rc/bin/rc-gemd/
+ dircp handlers /rc/bin/rc-gemd/handlers
+ mkdir -p /rc/bin/rc-gemd/skel/^(bin env pages rc)
--- a/rc-gemd
+++ b/rc-gemd
@@ -1,4 +1,5 @@
#!/bin/rc
+rfork E
rc_gemd_dir=/rc/bin/rc-gemd
path=(/bin $rc_gemd_dir/handlers)
cr=
--- a/select-handler
+++ b/select-handler
@@ -1,5 +1,15 @@
#!/bin/rc
+rfork n
+skel=$rc_gemd_dir^/skel
fs_root=/lib/gem
+
+bind $fs_root $skel^/pages
+bind /bin $skel^/bin
+bind /rc $skel^/rc
+bind -c '#e' $skel^/env
+bind $skel /
+fs_root=/pages
+
if(~ $location /)
location=/index.gem