Skip to content

Commit

Permalink
Fix spurious error msgs from live-boot about failed mounts…
Browse files Browse the repository at this point in the history
.. and directories already existing

> mount: mounting /dev/sr0 on /run/live/persistence/sr0 failed: No such device
> mount: mounting /dev/vda on /run/live/persistence/vda failed: No such device
> mkdir: can't create directory '/run/live/persistence/vda3/rw': File exists
> mkdir: can't create directory '/run/live/persistence/vda3/work': File exists
  • Loading branch information
eMPee584 committed Sep 12, 2019
1 parent a97c74c commit 5bf9f57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/9990-misc-helpers.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5bf9f57

Please sign in to comment.