From 6f92d789a0ed0d39e2a456fed2b7c8e3b56f3e2d Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Thu, 28 Oct 2021 06:15:35 +0900 Subject: [PATCH] msk: Fixup support for multiple remotes, add a few options --- apps/msk.c | 4 ++-- base/etc/msk.conf | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/msk.c b/apps/msk.c index 027f010f..a32411ff 100644 --- a/apps/msk.c +++ b/apps/msk.c @@ -209,7 +209,7 @@ static int update_stores(int argc, char * argv[]) { sprintf(cmd, "fetch -vo /tmp/.msk_remote_%s %s/manifest", remote_name, remote_path); fprintf(stderr, "Downloading remote manifest '%s'...\n", remote_name); if (system(cmd)) { - fprintf(stderr, "Error loading remote '%s' from '%s'.\n", remote_name, remote_path); + fprintf(stderr, "Skipping unavailable remote manifest '%s' (%s).\n", remote_name, remote_path); goto _next; } sprintf(cmd, "/tmp/.msk_remote_%s", remote_name); @@ -242,7 +242,7 @@ static int update_stores(int argc, char * argv[]) { one_success = 1; _next: - tok = strtok_r(NULL, " ", &save); + tok = strtok_r(NULL, ",", &save); } while (tok); free(order); diff --git a/base/etc/msk.conf b/base/etc/msk.conf index 339fe7cd..2860d1e4 100644 --- a/base/etc/msk.conf +++ b/base/etc/msk.conf @@ -1,6 +1,7 @@ -remote_order=local,remote +remote_order=cdrom,local,cdn,fallback [remotes] -local=/cdrom/extra -#remote=http://toaruos.org/msk/2.0.x -remote=http://toaruos.sfo3.cdn.digitaloceanspaces.com/msk/2.0.x +cdrom=/cdrom/extra +local=http://10.0.2.2:8080 +fallback=http://toaruos.org/msk/2.0.x +cdn=http://toaruos.sfo3.cdn.digitaloceanspaces.com/msk/2.0.x