当我从 bash 运行我的 SSHFS 连接脚本时,一切正常。
但是,当我使用该expect
实用程序运行相同的脚本时,当我尝试访问文件夹安装位置时出现以下错误:
Transport endpoint is not connected
Run Code Online (Sandbox Code Playgroud)
这是我的期望脚本:
#!/usr/bin/expect -f
spawn standard_sshfs_connection_string_or_script
expect "password: "
send "my_password\r"
Run Code Online (Sandbox Code Playgroud)
问:有什么想法吗?
笔记:
fusermount -u mount_location
spawn
创建新进程的事情,也许 sshfs 进程过早关闭?(有没有办法确保 sshfs 进程保持打开状态?)