mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
a9bf8397ab
commit
39e476a17f
@@ -38,6 +38,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
|
||||
|
||||
[ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
|
||||
|
||||
MOUNT="$MOUNT -o silent"
|
||||
|
||||
Reference in New Issue
Block a user