Thread: expect goes too quick
i have bash script mounts filesystem password using expect shown here:
first, understand many issues doing (security, etc), absolutely necessary reasons.code:spawn -ignore hup /usr/bin/sshfs <filesystem> <mountpoint> expect "assword:" send "blahblahblah" expect eof
script used work perfect every time, month ago stopped working 90% of time. when run script manually, can see sending password 1-2 seconds before password prompt.
have idea why expect not wait until getting queue before sending? in advance!
it means 'assword:' prompt in expect input buffer, reacts old data instead of waiting new data. try flushing input buffer @ start of script (can't remember how, sorry!).
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [all variants] expect goes too quick
Ubuntu
Comments
Post a Comment