diff options
author | Kevin Hao <kexin.hao@windriver.com> | 2018-10-22 19:58:40 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-25 14:53:44 +0100 |
commit | 39e476a17f6c509978e407556dfe2e9aa952a9e3 (patch) | |
tree | 7f93f2d7fa1757ed93a87146942a3faa7ad9e3d5 /meta | |
parent | a9bf8397ab6740ef8e3e56125a7de7bf839d8e67 (diff) | |
download | poky-39e476a17f6c509978e407556dfe2e9aa952a9e3.tar.gz |
udev-extraconf: Skip the entry in /etc/fstab when using the systemd-mount
When using systemd, the systemd-fstab-generator would parse the
/etc/fstab and create the corresponding unit dynamically. So we don't
need to handle the ADD action for the partitions in /etc/fstab.
(From OE-Core rev: 6104109ceba1a1323e42d67a632921fb91184ab6)
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/udev/udev-extraconf/mount.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index afb368dd67..3ee67b1318 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh | |||
@@ -38,6 +38,15 @@ done | |||
38 | automount_systemd() { | 38 | automount_systemd() { |
39 | name="`basename "$DEVNAME"`" | 39 | name="`basename "$DEVNAME"`" |
40 | 40 | ||
41 | # Skip the partition which are already in /etc/fstab | ||
42 | grep "^[[:space:]]*$DEVNAME" /etc/fstab && return | ||
43 | for n in LABEL PARTLABEL UUID PARTUUID; do | ||
44 | tmp="$(lsblk -o $n $DEVNAME | sed -e '1d')" | ||
45 | test -z "$tmp" && continue | ||
46 | tmp="$n=$tmp" | ||
47 | grep "^[[:space:]]*$tmp" /etc/fstab && return | ||
48 | done | ||
49 | |||
41 | [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name" | 50 | [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name" |
42 | 51 | ||
43 | MOUNT="$MOUNT -o silent" | 52 | MOUNT="$MOUNT -o silent" |