We have code in ubuntu-core-rootfs that processes all mounts in
/etc early. Part of it does a mkdir to create missing mount-points.
However some mounts in /etc are file-based bind mounts
(like /etc/hosts). For those the current code will try to
mkdir /etc/hosts but that fails because the file may exist already.
This PR fixes this error by checking for the existance of the
target only (the previous code was checking for the directory).
We have code in ubuntu-core-rootfs that processes all mounts in /etc early. Part of it does a mkdir to create missing mount-points.
However some mounts in /etc are file-based bind mounts (like /etc/hosts). For those the current code will try to mkdir /etc/hosts but that fails because the file may exist already.
This PR fixes this error by checking for the existance of the target only (the previous code was checking for the directory).