From 655a53eaa48971bd033c6afb4a279aac53b80a10 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sat, 30 Sep 2023 22:04:38 +0200 Subject: update wording: server -> peer --- initcpio/install/pacredir | 2 +- pacredir.c | 16 ++++++++-------- pacredir.conf | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/initcpio/install/pacredir b/initcpio/install/pacredir index f9663af..30d248f 100644 --- a/initcpio/install/pacredir +++ b/initcpio/install/pacredir @@ -5,7 +5,7 @@ build() { } help() { - echo 'This hook adds servers to pacredir.conf from inside initramfs.' + echo 'This hook adds peers to pacredir.conf from inside initramfs.' echo 'Useless for installed systems, but can be handy with' echo 'no-persistent configurations.' } diff --git a/pacredir.c b/pacredir.c index 3f0df03..9fa5921 100644 --- a/pacredir.c +++ b/pacredir.c @@ -312,7 +312,7 @@ static void * get_http_code(void * data) { /* perform the request */ if ((res = curl_easy_perform(curl)) != CURLE_OK) { - write_log(stderr, "Could not connect to server %s on port %d: %s\n", + write_log(stderr, "Could not connect to peer %s on port %d: %s\n", request->host->host, request->host->port, *errbuf != 0 ? errbuf : curl_easy_strerror(res)); request->http_code = 0; @@ -439,7 +439,7 @@ static mhd_result ahc_echo(void * cls, } } - /* try to find a server with most recent file */ + /* try to find a peer with most recent file */ while (tmphosts->host != NULL) { struct hosts * host = tmphosts; time_t badtime = host->badtime + host->badcount * BADTIME; @@ -524,14 +524,14 @@ static mhd_result ahc_echo(void * cls, } if (request->http_code == MHD_HTTP_OK && - /* for db files choose the most recent server when not too old */ + /* for db files choose the most recent peer when not too old */ ((dbfile == 1 && ((request->last_modified > last_modified && request->last_modified + 86400 > time(NULL)) || - /* but use a faster server if available */ + /* but use a faster peer if available */ (url != NULL && request->last_modified >= last_modified && request->time_total < time_total))) || - /* for packages try to guess the fastest server */ + /* for packages try to guess the fastest peer */ (dbfile == 0 && request->time_total < time_total))) { if (url != NULL) free(url); @@ -566,13 +566,13 @@ response: if (dbfile > 0 && ignore_db_files > 0) write_log(stdout, "Ignoring request for db file %s.\n", basename); else if (req_count < 0) - write_log(stdout, "Currently no servers are available to check for %s.\n", + write_log(stdout, "Currently no peers are available to check for %s.\n", basename); else if (dbfile > 0) - write_log(stdout, "No more recent version of %s found on %d servers.\n", + write_log(stdout, "No more recent version of %s found on %d peers.\n", basename, req_count + 1); else - write_log(stdout, "File %s not found on %d servers, giving up.\n", + write_log(stdout, "File %s not found on %d peers, giving up.\n", basename, req_count + 1); page = malloc(strlen(PAGE404) + strlen(basename) + 1); diff --git a/pacredir.conf b/pacredir.conf index 3d79d1e..0cbd667 100644 --- a/pacredir.conf +++ b/pacredir.conf @@ -3,10 +3,10 @@ # We need a default section and call it 'general', so do not change this line. [general] -# By default pacredir does requests to all services it knows about +# By default pacredir sends requests to all peers it knows about # simultaneously. Use this to limit the number of threads, the special value # 0 means unlimited. -# Be aware that pacredir will not find files on servers it does not check! +# Be aware that pacredir will not find files on peers it does not check! max threads = 0 #max threads = 32 @@ -32,7 +32,7 @@ protocol = IPv4 # You may want to add hosts that do not announce their services via avahi or # are connected to a different network segment. Add them here. IPv6 addresses # have to be enclosed in square brackets. -# Please note that pacserve hosts depend on the servers architecture! +# Please note that pacserve hosts depend on the peers' architecture! #pacserve hosts = test1.domain #pacserve hosts = test1.domain test2.domain -- cgit v1.2.3-54-g00ecf