proot: Only bind /property_contexts if file exists

Fixes the following warning when running termux-chroot on Android 8:

proot warning: can't sanitize binding "/property_contexts":
No such file or directory
This commit is contained in:
Fredrik Fornwall 2017-11-21 05:13:54 +01:00
parent fccb3f172e
commit ddd429197e
1 changed files with 5 additions and 2 deletions

View File

@ -31,8 +31,11 @@ ARGS="$ARGS -b /vendor:/vendor"
# and $HOME so that Termux programs with hard-coded paths continue to work:
ARGS="$ARGS -b /data:/data"
# Used by getprop (see https://github.com/termux/termux-packages/issues/1076):
ARGS="$ARGS -b /property_contexts:/property_contexts"
if [ -f /property_contexts ]; then
# Used by getprop (see https://github.com/termux/termux-packages/issues/1076)
# but does not exist on Android 8.
ARGS="$ARGS -b /property_contexts:/property_contexts"
fi
# Expose external and internal storage:
if [ -d /storage ]; then