diff options
author | Joshua Lock <josh@linux.intel.com> | 2012-01-31 16:49:47 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-02 18:26:50 +0000 |
commit | 111d1b8bb2b89e06091335fff6a917bbd9a1f66e (patch) | |
tree | 9f3b1ba19d1f01667afbc42ad65e821e5565b389 /meta/recipes-extended/sysklogd/sysklogd.inc | |
parent | ad72484a2783afa948966263629006558fbde476 (diff) | |
download | openembedded-core-111d1b8bb2b89e06091335fff6a917bbd9a1f66e.tar.gz openembedded-core-111d1b8bb2b89e06091335fff6a917bbd9a1f66e.tar.bz2 openembedded-core-111d1b8bb2b89e06091335fff6a917bbd9a1f66e.zip |
sysklogd: various fixes so it starts/stops cleanly
This patch fixes several issues with the sysklogd recipe:
o Errors at start due to non-existent /var/log/news/ - every other log
file is created in /var/log, not a sub-directory. Do the same for news
logs.
o klogd would not be stopped due to pidfile recycling, give klogd its own
pidfile
o preinstalls failed at rootfs creation time by trying to access the host
root filesystem rather than a path relative to $D. Update the preinst to
test for $D and do the right thing.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/sysklogd/sysklogd.inc')
-rw-r--r-- | meta/recipes-extended/sysklogd/sysklogd.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index 0b84dace96..fb2ddb2013 100644 --- a/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/meta/recipes-extended/sysklogd/sysklogd.inc @@ -46,12 +46,14 @@ do_install () { pkg_preinst_${PN} () { # all this is needed to avoid sysmlink errors, # because update-rc.d runs before pkg_postinst - if [ -e ${sysconfdir}/init.d/syslog -a ! -L ${sysconfdir}/init.d/syslog ]; then + ETC=$D${sysconfdir} + + if [ -e $ETC/init.d/syslog -a ! -L $ETC/init.d/syslog ]; then echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old" - mv ${sysconfdir}/init.d/syslog ${sysconfdir}/init.d/syslog.old + mv $ETC/init.d/syslog $ETC/init.d/syslog.old fi - if [ ! -e ${sysconfdir}/init.d/syslog ]; then - ln -s dummy ${sysconfdir}/init.d/syslog + if [ ! -e $ETC/init.d/syslog ]; then + ln -s dummy $ETC/init.d/syslog fi } |