mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-08 02:41:55 +01:00
Remove a warning when $HOME is on NFS
If ~/.subversion doesn't exist, the code didn't run, but if it existed there is no reason to re-create it, nor is it necessary to change its permissions since they are inherited by the bind mount source. However user_mkdir was trying to run chown as root which does not work over NFS with root_squash or krb-nfs. Therefore, the un-needed call to user_mkdir is removed. (this is an issue because cros_sdk --replace does call this code path multiple times). BUG=None TEST=Built the chroot, and the permission denied on 'install' went away. Change-Id: I01e9a7baf51a99a96d790c9613e26e652379e6df Reviewed-on: https://gerrit.chromium.org/gerrit/44880 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Marc MERLIN <merlin@chromium.org> Tested-by: Marc MERLIN <merlin@chromium.org>
This commit is contained in:
parent
99d8dde1d6
commit
a1f5ee388d
@ -474,7 +474,7 @@ is_nfs() {
|
|||||||
|
|
||||||
warn_if_nfs() {
|
warn_if_nfs() {
|
||||||
if is_nfs "$1"; then
|
if is_nfs "$1"; then
|
||||||
warn "$1 is on NFS. This is unsupported."
|
warn "$1 is on NFS. This is untested. You can send patches if it's broken."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -316,9 +316,8 @@ setup_env() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$SUDO_HOME/.subversion" ]; then
|
if [[ -d "$SUDO_HOME/.subversion" ]]; then
|
||||||
TARGET="/home/${SUDO_USER}/.subversion"
|
TARGET="/home/${SUDO_USER}/.subversion"
|
||||||
user_mkdir "${FLAGS_chroot}${TARGET}"
|
|
||||||
setup_mount "${SUDO_HOME}/.subversion" "--bind" "${TARGET}"
|
setup_mount "${SUDO_HOME}/.subversion" "--bind" "${TARGET}"
|
||||||
# Symbolic-link the .subversion directory so sandboxed subversion.class
|
# Symbolic-link the .subversion directory so sandboxed subversion.class
|
||||||
# clients can use it.
|
# clients can use it.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user