busybox is installed by packagegroup-core-boot and sysklogd by packagegroup-core-basic. Both end up in core-image-lsb. Both provide /sbin/syslogd under update-alternatives, with the sysklogd version having higher priority. systemd starts syslogd using busybox-syslog.service, but that service references /sbin/syslogd regardless of that referring to sysklogd. The command-line arguments between the two versions are incompatible. The net result is that, if VIRTUAL-RUNTIME_init_manager = "systemd", core-image-lsb will fail to start syslogd. root@beagleboard:~# ls -l /sbin/syslogd lrwxrwxrwx 1 root root 22 Aug 28 2013 /sbin/syslogd -> /sbin/syslogd.sysklogd root@beagleboard:~# ls -l /lib/systemd/system/*syslog* -rw-r--r-- 1 root root 270 Aug 28 2013 /lib/systemd/system/busybox-syslog.service lrwxrwxrwx 1 root root 9 Aug 28 2013 /lib/systemd/system/syslog.service -> /dev/null -rw-r--r-- 1 root root 1235 Aug 28 2013 /lib/systemd/system/syslog.socket root@beagleboard:~# systemctl status busybox-syslog.service busybox-syslog.service - System Logging Service Loaded: loaded (/lib/systemd/system/busybox-syslog.service; enabled) Active: failed (Result: start-limit) since Sat 2000-01-01 00:04:29 UTC; 51s ago Process: 307 ExecStart=/sbin/syslogd -n $OPTIONS (code=exited, status=1/FAILURE) Main PID: 307 (code=exited, status=1/FAILURE) CGroup: /system.slice/busybox-syslog.service Jan 01 00:04:29 beagleboard systemd[1]: Starting System Logging Service... Jan 01 00:04:29 beagleboard systemd[1]: Started System Logging Service. Jan 01 00:04:29 beagleboard systemd[1]: busybox-syslog.service: main process exited, code=exited, status=1/FAILURE Jan 01 00:04:29 beagleboard systemd[1]: Unit busybox-syslog.service entered failed state.
As the service is named as 'busybox-sylog.service', I think we should explicitly use busybox in that service file. So, instead of using ExecStart=@base_sbindir@/syslogd -n $OPTIONS maybe we should use ExecStart=@busybox_exec_syslogd@ -n $OPTIONS And at do_install, we replace the @busybox_exec_syslogd@ with '/bin/busybox.nosuid syslogd' or '/bin/busybox syslod' according to whether we're splitting the busybox binary. //Chen Qi
(In reply to comment #1) > As the service is named as 'busybox-sylog.service', I think we should > explicitly use busybox in that service file. > > So, instead of using > ExecStart=@base_sbindir@/syslogd -n $OPTIONS > maybe we should use > ExecStart=@busybox_exec_syslogd@ -n $OPTIONS > > And at do_install, we replace the @busybox_exec_syslogd@ with > '/bin/busybox.nosuid syslogd' or '/bin/busybox syslod' according to whether > we're splitting the busybox binary. > > //Chen Qi I agree this would be less confusing and might be worth doing, but it doesn't address the underlying issue: if update-alternatives selects sysklogd as the source for /sbin/syslogd, busybox's syslogd should not be started by systemd. I think the real fix requires adding syslogd systemd service management to the ua rules for syslogd. I also think this is going to require pretty advanced recipe-fu and I'm not there yet.
Hi Ross, Are we going to use different syslog service providers in systemd according to which one provides the /sbin/syslogd, just as Peter suggested? Or we only use busybox's syslogd service? Best Regards, Chen Qi
sysklogd package hasn't got systemd support. So I think in case of a systemd based system, we should weigh busybox's syslog and klogd utilities over the sysklogd package. Because by default, busybox has CONFIG_FEATURE_SYSTEMD enabled. Besides, as busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, it should have a configuration file '/etc/syslog.conf' in busybox-syslog package. //Chen Qi
merged into poky/master: 101662d357adfb200c5b38b71494fced1fda5607 43510e5c775597fd78eab5f703e447fb238403f6 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=45d18a1b6bcdc56d252b289d0d304b26799943b0 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b7f6688f0700a1575037362af7a8ca94dccce471