diff options
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" |