Author: Andy Green Date: Thu Feb 10 11:53:49 2022 +0000 config file fixes and pid inclusion diff --git a/READMEs/README-systemd-nspawn.md b/READMEs/README-systemd-nspawn.md index 611db85..73c593a 100644 --- a/READMEs/README-systemd-nspawn.md +++ b/READMEs/README-systemd-nspawn.md @@ -173,7 +173,7 @@ Container # dnf install sudo make git gcc gcc-c++ cmake net-tools dhclient open ### Specific to Centos 8 -Centos / RHEL 8 simply doesn't provide some -devel packages like mbedtls, libgit2... +Centos / RHEL 8 simply doesn't provide some -devel packages like mbedtls, libgit2... most missing -devel packages can be found in the `powertools` repo ``` Container # dnf install sudo make git gcc gcc-c++ cmake net-tools dhclient openssl-devel vim glibc.i686 dbus glib2-devel libevent-devel libev-devel sqlite-devel libgit2 dbus systemd-container vim libpkgconf rpm-build diff --git a/src/builder/b-sai.c b/src/builder/b-sai.c index d7bf7d4..f65c639 100644 --- a/src/builder/b-sai.c +++ b/src/builder/b-sai.c @@ -29,6 +29,10 @@ #include #include +#if defined(__linux__) +#include +#endif + #if defined(__APPLE__) #include /* for mkdir() */ #include /* for chown() */ @@ -38,6 +42,9 @@ #include #include #include + +int getpid(void) { return 0; } + #endif #include "b-private.h" @@ -209,7 +216,7 @@ saib_create_resproxy_listen_uds(struct lws_context *context, info.vhost_name = pv; pv += lws_snprintf(pv, sizeof(vhnames) - (size_t)(pv - vhnames), - "resproxy.%d", spm->index) + 1; + "resproxy.%u.%d", getpid(), spm->index) + 1; info.options = LWS_SERVER_OPTION_ADOPT_APPLY_LISTEN_ACCEPT_CONFIG | LWS_SERVER_OPTION_UNIX_SOCK; @@ -356,7 +363,7 @@ app_system_state_nf(lws_state_manager_t *mgr, lws_state_notify_link_t *link, lws_snprintf(spm->resproxy_path, sizeof(spm->resproxy_path), #if defined(__linux__) - UDS_PATHNAME_RESPROXY".%d", + UDS_PATHNAME_RESPROXY".%u.%d", getpid(), #else UDS_PATHNAME_RESPROXY"/%d", #endif @@ -420,6 +427,9 @@ int main(int argc, const char **argv) if ((p = lws_cmdline_option(argc, argv, "-d"))) logs = atoi(p); + if ((p = lws_cmdline_option(argc, argv, "-c"))) + config_dir = p; + #if defined(__NetBSD__) || defined(__OpenBSD__) if (lws_cmdline_option(argc, argv, "-D")) { if (lws_daemonize("/var/run/sai_builder.pid"))