diff options
author | Christian Hesse <mail@eworm.de> | 2023-09-30 22:04:38 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-09-30 22:04:38 +0200 |
commit | 655a53eaa48971bd033c6afb4a279aac53b80a10 (patch) | |
tree | b0d31d7b7026c490a86a020dbbb9eb26e5a7df71 | |
parent | 75cd3e974c3b43d38aa0bb9aea3254b7c0054a23 (diff) | |
download | pacredir-655a53eaa48971bd033c6afb4a279aac53b80a10.tar.gz pacredir-655a53eaa48971bd033c6afb4a279aac53b80a10.tar.zst |
update wording: server -> peer
-rw-r--r-- | initcpio/install/pacredir | 2 | ||||
-rw-r--r-- | pacredir.c | 16 | ||||
-rw-r--r-- | 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.' } @@ -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 |