mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 14:01:43 +01:00
Make mount points before attempting to mount on them
BUG=chromium-os:11944 TEST=the correct test for this is a complete rebuild; I have this running, but it's going to take a little while. I have tested this on the specific cases of ssh_auth_sock and .subversion Change-Id: I61723356c58bfb7c2090e950208b8a6ab8fa2fc9 Review URL: http://codereview.chromium.org/6519022
This commit is contained in:
parent
351a76fc96
commit
33373ef899
@ -143,6 +143,11 @@ function ensure_mounted {
|
||||
local mounted_path="$(readlink -f "${FLAGS_chroot}/$target")"
|
||||
|
||||
if [ -z "$(mount | grep -F "on ${mounted_path} ")" ]; then
|
||||
# Attempt to make the mountpoint as the user. This depends on the
|
||||
# fact that all mountpoints that should be owned by root are
|
||||
# already present.
|
||||
mkdir -p "${mounted_path}"
|
||||
|
||||
# NB: mount_args deliberately left unquoted
|
||||
debug mount ${mount_args} "${source}" "${mounted_path}"
|
||||
sudo -- mount ${mount_args} "${source}" "${mounted_path}" || \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user