2moe/tmoe

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

5kind opened this issue · 1 comments

5kind commented

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

2moe commented

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


其实你可以改 MOUNT_SOURCE_1MOUNT_POINT_1

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