Skip to content

Commit

Permalink
Merge pull request #51 from ejoerns/v0/topic/nfsboot2
Browse files Browse the repository at this point in the history
install: ignore missing active slot for nfs boots
  • Loading branch information
jluebbe committed Jun 15, 2016
2 parents e77c4eb + be5cf4a commit 9fcd0c5
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions src/install.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,11 @@ gboolean determine_slot_states(GError **error) {
}
}

if (!booted) {
g_set_error_literal(
error,
R_SLOT_ERROR,
3,
"Did not find booted slot");
goto out;
}

res = TRUE;
booted->state = ST_BOOTED;
g_debug("Found booted slot: %s on %s", booted->name, booted->device);
if (booted) {
booted->state = ST_BOOTED;
g_debug("Found booted slot: %s on %s", booted->name, booted->device);
}

/* Determine active group members */
for (GList *l = slotlist; l != NULL; l = l->next) {
Expand All @@ -220,6 +213,24 @@ gboolean determine_slot_states(GError **error) {
}
}

if (!booted) {

if (g_strcmp0(bootname, "/dev/nfs") == 0) {
g_message("Detected nfs boot, ignoring missing active slot");
res = TRUE;
goto out;
}

g_set_error_literal(
error,
R_SLOT_ERROR,
3,
"Did not find booted slot");
goto out;
}

res = TRUE;

out:
g_clear_pointer(&slotlist, g_list_free);
r_context_end_step("determine_slot_states", res);
Expand Down

0 comments on commit 9fcd0c5

Please sign in to comment.