Accepting request 106115 from home:mtomaschewski:branches:Base:System
Werner: please review and forward to factory, see bnc#747871 OBS-URL: https://build.opensuse.org/request/show/106115 OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=80
This commit is contained in:
parent
478adbdebe
commit
1f2f1588b8
29
sysklogd-1.4.1-systemd-sock-name.patch
Normal file
29
sysklogd-1.4.1-systemd-sock-name.patch
Normal file
@ -0,0 +1,29 @@
|
||||
--- syslogd.c
|
||||
+++ syslogd.c 2012/02/20 19:41:22
|
||||
@@ -558,6 +558,10 @@ static char sccsid[] __attribute__ ((un
|
||||
#define _PATH_LOG "/dev/log"
|
||||
#endif
|
||||
|
||||
+#ifndef SYSTEMD_PATH_LOG
|
||||
+#define SYSTEMD_PATH_LOG "/run/systemd/journal/syslog"
|
||||
+#endif
|
||||
+
|
||||
char *ConfFile = _PATH_LOGCONF;
|
||||
char *PidFile = _PATH_LOGPID;
|
||||
char ctty[] = _PATH_CONSOLE;
|
||||
@@ -889,6 +893,15 @@ int main(argc, argv)
|
||||
funix[i] = -1;
|
||||
}
|
||||
|
||||
+ /* systemd >= 38 wants we use /run/systemd/journal/syslog,
|
||||
+ * instead of /dev/log, but allow to override it using -p */
|
||||
+ if(sd_booted()) {
|
||||
+ struct stat st;
|
||||
+ if(stat(SYSTEMD_PATH_LOG, &st) != -1 && S_ISSOCK(st.st_mode)) {
|
||||
+ funixn[0] = SYSTEMD_PATH_LOG;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
while ((ch = getopt(argc, argv, "a:dhf:l:m:np:rs:tvS")) != EOF)
|
||||
switch((char)ch) {
|
||||
case 'a':
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 20 19:43:28 UTC 2012 - mt@suse.com
|
||||
|
||||
- Detect if we have to use the new /run/systemd/journal/syslog
|
||||
socket instead of the /dev/log under newer systemd versions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 20 12:25:12 UTC 2012 - mt@suse.com
|
||||
|
||||
|
@ -71,6 +71,7 @@ Patch22: sysklogd-1.4.1-sysmap-prior-to-2.5.patch
|
||||
Patch23: sysklogd-1.4.1-reload.dif
|
||||
Patch24: sysklogd-1.4.1-systemd.dif
|
||||
Patch25: sysklogd-1.4.1-systemd-multi.dif
|
||||
Patch26: sysklogd-1.4.1-systemd-sock-name.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{expand: %%global sysdsysunitdir %(pkg-config systemd --variable=systemdsystemunitdir)}
|
||||
%{expand: %%global sysdsysconfdir %(pkg-config systemd --variable=systemdsystemconfdir)}
|
||||
@ -162,6 +163,7 @@ Authors:
|
||||
%patch23 -p0 -b .reload
|
||||
%patch24 -p0 -b .sd
|
||||
%patch25 -p0 -b .sd2
|
||||
%patch26 -p0 -b .sd3
|
||||
%patch0 -p0
|
||||
|
||||
%build
|
||||
|
Loading…
x
Reference in New Issue
Block a user