loads initial filesystem from pill, -A optional for all ships

This commit is contained in:
Joe Bryan 2018-12-04 00:54:56 -05:00
parent 2ed422e11f
commit bf4e7910dc
2 changed files with 19 additions and 18 deletions

View File

@ -196,11 +196,6 @@ _main_getopt(c3_i argc, c3_c** argv)
c3_t imp_t = ( (0 != u3_Host.ops_u.who_c) && (4 == strlen(u3_Host.ops_u.who_c)) ); c3_t imp_t = ( (0 != u3_Host.ops_u.who_c) && (4 == strlen(u3_Host.ops_u.who_c)) );
if ( u3_Host.ops_u.arv_c != 0 && !imp_t ) {
fprintf(stderr, "-A only makes sense when creating a new galaxy\n");
return c3n;
}
if ( u3_Host.ops_u.ets_c == 0 && c3y == u3_Host.ops_u.etn ) { if ( u3_Host.ops_u.ets_c == 0 && c3y == u3_Host.ops_u.etn ) {
fprintf(stderr, "can't trust Ethereum snapshot without specifying " fprintf(stderr, "can't trust Ethereum snapshot without specifying "
"snapshot with -E\n"); "snapshot with -E\n");
@ -213,12 +208,6 @@ _main_getopt(c3_i argc, c3_c** argv)
return c3n; return c3n;
} }
if ( u3_Host.ops_u.arv_c == 0 && imp_t ) {
fprintf(stderr, "can't create a new galaxy without specifying "
"the initial sync path with -A\n");
return c3n;
}
if ( u3_Host.ops_u.gen_c != 0 && u3_Host.ops_u.nuu == c3n ) { if ( u3_Host.ops_u.gen_c != 0 && u3_Host.ops_u.nuu == c3n ) {
fprintf(stderr, "-G only makes sense when bootstrapping a new instance\n"); fprintf(stderr, "-G only makes sense when bootstrapping a new instance\n");
return c3n; return c3n;

View File

@ -1696,15 +1696,27 @@ u3_sist_boot(void)
// Authenticate and initialize terminal. // Authenticate and initialize terminal.
u3_term_ef_bake(pig); u3_term_ef_bake(pig);
// queue initial galaxy sync // queue initial filesystem sync
{ //
u3_noun rac = u3do("clan:title", u3k(u3A->own)); // from the Arvo directory if specified
if ( 0 != u3_Host.ops_u.arv_c ) {
u3_unix_ef_initial_into();
}
// otherwise from the pill
else {
c3_c ful_c[2048];
if ( c3__czar == rac ) { snprintf(ful_c, 2048, "%s/.urb/urbit.pill", u3_Host.dir_c);
u3_unix_ef_initial_into();
{
u3_noun sys = u3ke_cue(u3m_file(ful_c));
u3_noun fil;
u3x_trel(sys, 0, 0, &fil);
u3v_plow(u3k(fil));
u3z(sys);
} }
u3z(rac);
} }
// Create the event log // Create the event log