]> code.ossystems Code Review - openembedded-core.git/commitdiff
udev-extraconf: do not mount swap partitions
authorOleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Sat, 20 Jul 2019 15:57:50 +0000 (17:57 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 Jul 2019 20:36:02 +0000 (21:36 +0100)
Swap is a special filesystem that cannot be mounted, so do not try to,
otherwise we will have service that tries and fails to mount it with
the following error:

systemd[1]: Mounting /run/media/nvme0n1p3...
mount[1229]: mount: /run/media/nvme0n1p3: unknown filesystem type 'swap'.

Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev-extraconf/mount.sh

index 3ee67b13183a22fff4c7112e53cf4423ab4643e9..79eb0145c2a6b9da6e00bbe53eda21a3fd72c00d 100644 (file)
@@ -57,6 +57,8 @@ automount_systemd() {
     vfat|fat)
         MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
         ;;
+    swap)
+        return ;;
     # TODO
     *)
         ;;
@@ -98,6 +100,8 @@ automount() {
        vfat|fat)
                MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
                ;;
+       swap)
+               return ;;
        # TODO
        *)
                ;;