Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

关于 termux proot 挂载 $HOME 切换 $TERMUX_DIR #249

Open
5kind opened this issue Jan 13, 2023 · 1 comment
Open

关于 termux proot 挂载 $HOME 切换 $TERMUX_DIR #249

5kind opened this issue Jan 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@5kind
Copy link

5kind commented Jan 13, 2023

Related problem

proot 容器尝试挂载 $HOME ,设置如下
TERMUX_DIR="/data/data/com.termux/files/home"
TERMUX_MOUNT_POINT="/home/termux"
发现如何设置都无法挂载
查看容器启动脚本

607         if [[ ${MOUNT_TERMUX} = true ]]; then    
608             if [[ -x "${TERMUX_DIR}/home" ]];     then                                          
609                 set -- "${@}" "--mount=${TERMU    X_DIR}:${EXA_PREFIX}${TERMUX_MOUNT_POINT}"
610             fi
611         fi

以上脚本通常只能正常挂载 /data/data/com.termux/files
及其他子目录存在 home 的文件夹

Describe the solution you'd like

修改
share/old-version/share/container/proot/startup
第 612 行判断为
if [[ -x "${TERMUX_DIR}" ]]; then

Describe alternatives you've considered

No response

Additional context and details

No response

@5kind 5kind added the enhancement New feature or request label Jan 13, 2023
@2moe
Copy link
Owner

2moe commented Jan 13, 2023

谢谢,之后新版会改进的。
这个是很久之前写的了。
看到那个 = true, 我还有点尴尬。
对于 a=true; b=false 可以直接用 if $aif $b


其实你可以改 MOUNT_SOURCE_1MOUNT_POINT_1

不过这种风格的配置在之后应该只会用于环境变量的配置,不会用于一般的配置。
新版会用 toml 配置文件 + snake_case。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants