Skip to main content

Thread: expect goes too quick


i have bash script mounts filesystem password using expect shown here:

code:
spawn -ignore hup /usr/bin/sshfs <filesystem> <mountpoint>  expect "assword:"  send "blahblahblah"  expect eof
first, understand many issues doing (security, etc), absolutely necessary reasons.

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

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account