[oe-commits] [openembedded-core] 04/10: udev-extraconf/mount.sh: Skip the entry in /etc/fstab when using the systemd-moun
git at git.openembedded.org
git at git.openembedded.org
Sat Sep 22 15:59:01 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit b1a5062501cde88ace8329eae75aeaaa259ea573
Author: Hongzhi.Song <hongzhi.song at windriver.com>
AuthorDate: Sat Sep 15 22:45:32 2018 -0700
udev-extraconf/mount.sh: Skip the entry in /etc/fstab when using the systemd-moun
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.
Signed-off-by: Kevin Hao <kexin.hao at windriver.com>
Signed-off-by: Hongzhi.Song <hongzhi.song at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/recipes-core/udev/udev-extraconf/mount.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 4cb5db3..665ad3e 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -36,6 +36,15 @@ done
automount_systemd() {
name="`basename "$DEVNAME"`"
+ # Skip the partition which are already in /etc/fstab
+ grep "^[[:space:]]*$DEVNAME" /etc/fstab && return
+ for n in LABEL PARTLABEL UUID PARTUUID; do
+ tmp="$(lsblk -o $n $DEVNAME | sed -e '1d')"
+ test -z "$tmp" && continue
+ tmp="$n=$tmp"
+ grep "^[[:space:]]*$tmp" /etc/fstab && return
+ done
+
! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
# If filesystem type is vfat, change the ownership group to 'disk', and
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list