vere: add undocumented -h option

-h starts %khan. We don't want to run the control plane just anywhere,
to discourage Earth leaking into Mars. Using it should feel like you're
taking off the warranty sticker on your Urbit; this seems sufficient.
This commit is contained in:
Jōshin 2021-10-29 03:05:52 +00:00
parent 21f0b96413
commit c67864dc27
No known key found for this signature in database
GPG Key ID: A8BE5A9A521639D0
3 changed files with 8 additions and 1 deletions

View File

@ -67,6 +67,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.dry = c3n;
u3_Host.ops_u.gab = c3n;
u3_Host.ops_u.git = c3n;
u3_Host.ops_u.hos = c3n;
// always disable hashboard
// XX temporary, remove once hashes are added
@ -88,7 +89,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.kno_w = DefaultKernel;
while ( -1 != (ch_i=getopt(argc, argv,
"X:Y:G:J:B:b:K:A:H:I:C:w:u:e:F:k:n:p:r:i:Z:LljacdgqstvxPDRS")) )
"X:Y:G:J:B:b:K:A:H:I:C:w:u:e:F:k:n:p:r:i:Z:LljacdghqstvxPDRS")) )
{
switch ( ch_i ) {
case 'X': {
@ -198,6 +199,7 @@ _main_getopt(c3_i argc, c3_c** argv)
case 'c': { u3_Host.ops_u.nuu = c3y; break; }
case 'd': { u3_Host.ops_u.dem = c3y; break; }
case 'g': { u3_Host.ops_u.gab = c3y; break; }
case 'h': { u3_Host.ops_u.hos = c3y; break; }
case 'P': { u3_Host.ops_u.pro = c3y; break; }
case 'D': { u3_Host.ops_u.dry = c3y; break; }
case 'q': { u3_Host.ops_u.qui = c3y; break; }

View File

@ -283,6 +283,7 @@
c3_c* gen_c; // -G, czar generator
c3_o gab; // -g, test garbage collection
c3_c* dns_c; // -H, ames bootstrap domain
c3_o hos; // -h, hosted env (run control plane)
c3_c* jin_c; // -I, inject raw event
c3_c* imp_c; // -i, import pier state
c3_c* lit_c; // -J, ivory (fastboot) kernel

View File

@ -256,6 +256,10 @@ _khan_io_talk(u3_auto* car_u)
{
u3_khan* kan_u = (u3_khan*)car_u;
if ( c3n == u3_Host.ops_u.hos ) {
// do not run control plane outside of hosted context
return;
}
u3_noun wir = u3nt(c3__khan,
u3dc("scot", c3__uv, kan_u->sev_l),
u3_nul);