Bug 4860

Summary: syslog in systemd image ignores it's config file
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Stefan Stanacar <sstncr>
Component: coreAssignee: Chen Qi <Qi.Chen>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: liezhi.yang, mark.hatle, meta.mr.watcher, meta.watcher, Qi.Chen, yi.zhao
Version: 1.5   
Target Milestone: 1.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Stefan Stanacar 2013-07-17 12:43:45 UTC
poky commit: 3dee534f1e25109e0bdb681de0746c336f4b8840

1. Build and boot core-image-sato with systemd
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"

2. edit /etc/syslog-startup.conf (which is actully a link to /etc/syslog-startup.conf.busybox  and change LOGFILE from /var/log/messages to something else, e.g /var/log/test

3. systemctl restart syslog.service


4. /var/log/test should be created but it isn't

What happens here is that the service file just starts /sbin/syslog -n, and syslog seems to ignore it's startup file entirely.
The sysvinit startup script was actually sourcing and parsing /etc/syslog-startup.conf and passwd the values as arguments to syslog, the systemd service file just starts it.
Comment 1 Chen Qi 2013-07-17 15:32:13 UTC
A related bug.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4837

//Chen Qi
Comment 2 Chen Qi 2013-08-07 08:45:30 UTC
sysvinit and systemd have different ideas about configuration files (or environment files in systemd), so using the same one for both is not appropriate.

Remove the 'syslog-startup.conf' file if 'sysvinit' is not in DISTRO_FEATURES.

//Chen Qi
Comment 3 Chen Qi 2013-08-13 05:23:51 UTC
merged into poky/master

Commit: 89f62147a61108b4be40001e1fbe3be33bacf00b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=89f62147a61108b4be40001e1fbe3be33bacf00b
Comment 4 Stefan Stanacar 2013-10-07 13:39:57 UTC
Okay, Verified.