stdout-bridge: rename logger to stdout-syslog-bridge to make it more descriptive
This commit is contained in:
+2
-2
@@ -188,9 +188,9 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
|
||||
|
||||
zero(sa);
|
||||
sa.sa.sa_family = AF_UNIX;
|
||||
strncpy(sa.un.sun_path, LOGGER_SOCKET, sizeof(sa.un.sun_path));
|
||||
strncpy(sa.un.sun_path, STDOUT_SYSLOG_BRIDGE_SOCKET, sizeof(sa.un.sun_path));
|
||||
|
||||
if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(LOGGER_SOCKET) - 1) < 0) {
|
||||
if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(STDOUT_SYSLOG_BRIDGE_SOCKET) - 1) < 0) {
|
||||
close_nointr_nofail(fd);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ struct CGroupAttribute;
|
||||
#include "list.h"
|
||||
#include "util.h"
|
||||
|
||||
#define LOGGER_SOCKET "/run/systemd/logger"
|
||||
#define STDOUT_SYSLOG_BRIDGE_SOCKET "/run/systemd/stdout-syslog-bridge"
|
||||
|
||||
typedef enum KillMode {
|
||||
KILL_CONTROL_GROUP = 0,
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@
|
||||
/* Services systemd relies on */
|
||||
#define SPECIAL_DBUS_SERVICE "dbus.service"
|
||||
#define SPECIAL_DBUS_SOCKET "dbus.socket"
|
||||
#define SPECIAL_LOGGER_SOCKET "systemd-logger.socket"
|
||||
#define SPECIAL_STDOUT_SYSLOG_BRIDGE_SOCKET "systemd-stdout-syslog-bridge.socket"
|
||||
#define SPECIAL_SYSLOG_SOCKET "syslog.socket"
|
||||
|
||||
/* Magic init signals */
|
||||
|
||||
@@ -409,7 +409,7 @@ static int stream_new(Server *s, int server_fd) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!socket_tcpwrap(fd, "systemd-logger")) {
|
||||
if (!socket_tcpwrap(fd, "systemd-stdout-syslog-bridge")) {
|
||||
close_nointr_nofail(fd);
|
||||
return 0;
|
||||
}
|
||||
@@ -652,7 +652,7 @@ int main(int argc, char *argv[]) {
|
||||
if (server_init(&server, (unsigned) n) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
log_debug("systemd-logger running as pid %lu", (unsigned long) getpid());
|
||||
log_debug("systemd-stdout-syslog-bridge running as pid %lu", (unsigned long) getpid());
|
||||
|
||||
sd_notify(false,
|
||||
"READY=1\n"
|
||||
@@ -682,7 +682,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = EXIT_SUCCESS;
|
||||
|
||||
log_debug("systemd-logger stopped as pid %lu", (unsigned long) getpid());
|
||||
log_debug("systemd-stdout-syslog-bridge stopped as pid %lu", (unsigned long) getpid());
|
||||
|
||||
fail:
|
||||
sd_notify(false,
|
||||
+1
-1
@@ -573,7 +573,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
||||
* logging daemon is run first. */
|
||||
|
||||
if (u->meta.manager->running_as == MANAGER_SYSTEM)
|
||||
if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0)
|
||||
if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_STDOUT_SYSLOG_BRIDGE_SOCKET, NULL, true)) < 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user