Merge branch 'fix-silence-mount-failures' into 'master'
authorRaphaël Hertzog <hertzog@debian.org>
Thu, 12 Sep 2019 13:25:21 +0000 (13:25 +0000)
committerRaphaël Hertzog <hertzog@debian.org>
Thu, 12 Sep 2019 13:25:21 +0000 (13:25 +0000)
Fix spurious error msgs from live-boot about failed mounts…

See merge request live-team/live-boot!22

components/9990-misc-helpers.sh

index 75338e0..7994ecd 100755 (executable)
@@ -780,7 +780,7 @@ mount_persistence_media ()
                then
                        mount_opts="ro,noatime"
                fi
-               if mount -t "${fstype}" -o "${mount_opts}" "${device}" "${backing}" >/dev/null
+               if mount -t "${fstype}" -o "${mount_opts}" "${device}" "${backing}" >/dev/null 2>&1
                then
                        echo ${backing}
                        return 0
@@ -1383,8 +1383,8 @@ do_union ()
                        # + a workdir to become mounted
                        # + workdir and upperdir to reside under the same mount
                        # + workdir and upperdir to be in separate directories
-                       mkdir "${unionrw}/rw"
-                       mkdir "${unionrw}/work"
+                       mkdir -p "${unionrw}/rw"
+                       mkdir -p "${unionrw}/work"
                        unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
                        ;;
        esac