Still having problems with vpnclient and "do shell script"
Still having problems with vpnclient and "do shell script"
- Subject: Still having problems with vpnclient and "do shell script"
- From: David Crowe <email@hidden>
- Date: Sat, 5 Jul 2003 12:04:32 -0600
I am trying to run the CISCO vpnclient application from an AppleScript.
The following script uses 'cat' to write some commands to a file and
then use "/bin/sh" to execute them. This is a bit cumbersome, but the
same problems occur no matter how I get the commands to the file.
do shell script "cat >" & theTempFile & " <<$
/usr/local/bin/vpnclient connect myprofile <<END
myusername
" & thePassword & "
y
END
$
/bin/sh " & theTempFile
fails miserably, with the vpnclient application complaining about
either fread or malloc errors.
Yet, if I take the temporary file that it produces and type:
/bin/sh theTempFile (substituting the name of the temp file)
it works perfectly (well, almost perfectly, I get four "tcgetattr
error: Inappropriate ioctl for device" errors, but those are only
whines, not fatal errors).
Obviously this is something specific to this application, but perhaps
someone has some ideas. There must be something very different about
the environment of an application run via "do shell script" (even via
a nested shell) than from the Terminal application.
The postcardware application VPNConnect runs the shell via Visual
Basic and works just fine (even without the tcgetattr warnings).
Any suggestions are welcome before I give up!
- David Crowe
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.