]> code.ossystems Code Review - openembedded-core.git/commitdiff
udev-extraconf: Use the canonical file name of systemd
authorKevin Hao <kexin.hao@windriver.com>
Mon, 22 Oct 2018 11:58:38 +0000 (19:58 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Oct 2018 13:36:34 +0000 (14:36 +0100)
The new version of systemd has changed the symbolic link between
/sbin/init and /lib/systemd/systemd to relative. So the output of
the command 'readlink /sbin/init' become:
    ../lib/systemd/systemd

Then it causes the following check of "/lib/systemd/systemd" to return
false. Fix this issue by using the canonical file name of the systemd.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev-extraconf/mount.sh

index 067d4e2a16fbe0737e85cfdd67c54fd2aa1dfb62..34ef98a6a882198ef91f72a48f7e588cdf12e43d 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Attempt to mount any added block devices and umount any removed devices
 
-BASE_INIT="`readlink "@base_sbindir@/init"`"
+BASE_INIT="`readlink -f "@base_sbindir@/init"`"
 INIT_SYSTEMD="@systemd_unitdir@/systemd"
 
 if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then