]> code.ossystems Code Review - openembedded-core.git/commitdiff
lsb: add checking for chkconfig existence when creating the symbolic
authorZhenbo Gao <zhenbo.gao@windriver.com>
Mon, 17 Jul 2017 09:13:08 +0000 (17:13 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Jul 2017 11:36:35 +0000 (12:36 +0100)
remove_initd and remove_initd will be created as the symbolic file
of chkconfig, which will be not existed when systemd is configured,
so adding the check for the existence of chkconfig before creating
the symbolic.

Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/lsb/lsb_4.1.bb

index cedf39eb65792d51911cf46f5f71a1d36125088e..c8db1a8156b973df537f5a82800c1a0977aa6044 100644 (file)
@@ -90,11 +90,13 @@ do_install_append() {
        install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
 
        # create links for LSB test
-       if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
-               install -d ${D}${nonarch_libdir}/lsb
+       if [ -e ${sbindir}/chkconfig ]; then
+               if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+                       install -d ${D}${nonarch_libdir}/lsb
+               fi
+               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
+               ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
        fi
-       ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
-       ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
 
        if [ "${TARGET_ARCH}" = "x86_64" ]; then
                if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then