mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 10:02:32 +03:00
loads initial filesystem from pill, -A optional for all ships
This commit is contained in:
parent
2ed422e11f
commit
bf4e7910dc
11
vere/main.c
11
vere/main.c
@ -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)) );
|
||||
|
||||
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 ) {
|
||||
fprintf(stderr, "can't trust Ethereum snapshot without specifying "
|
||||
"snapshot with -E\n");
|
||||
@ -213,12 +208,6 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
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 ) {
|
||||
fprintf(stderr, "-G only makes sense when bootstrapping a new instance\n");
|
||||
return c3n;
|
||||
|
24
vere/sist.c
24
vere/sist.c
@ -1696,15 +1696,27 @@ u3_sist_boot(void)
|
||||
// Authenticate and initialize terminal.
|
||||
u3_term_ef_bake(pig);
|
||||
|
||||
// queue initial galaxy sync
|
||||
{
|
||||
u3_noun rac = u3do("clan:title", u3k(u3A->own));
|
||||
|
||||
if ( c3__czar == rac ) {
|
||||
// queue initial filesystem sync
|
||||
//
|
||||
// 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];
|
||||
|
||||
u3z(rac);
|
||||
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", u3_Host.dir_c);
|
||||
|
||||
{
|
||||
u3_noun sys = u3ke_cue(u3m_file(ful_c));
|
||||
u3_noun fil;
|
||||
|
||||
u3x_trel(sys, 0, 0, &fil);
|
||||
u3v_plow(u3k(fil));
|
||||
|
||||
u3z(sys);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the event log
|
||||
|
Loading…
Reference in New Issue
Block a user