Josh -

Will it work by doing what Mark Smith mentioned on 4/25/08? (below)

Another option is to open "/bin/bash" as a process, so you can then read and write to it as if it were the 'terminal' app.

best,

Mark
Phil Davis



Josh Mellicker wrote:
Thanks for the detailed example, but apparently rsync won't accept a password this way or I just don't get it (or both :-)

So here's where I'm stuck:

In Terminal, you:

1. issue the rsync command
2. then, at the next prompt, you are asked for the server password. Typing this and pressing enter starts the rsyncing.

I cannot figure out how to respond to this second prompt with either "shell" or "open process-write to process".


I have tried to implement this solution:

http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/

for being able to automate rsync by setting up a secure an SSH key pair, so I don't need a password, but this too is beyond my capabilities.


Again, I would gladly finance the effort of creating a test stack and share it, I think many developers would enjoy Rev working with rsync.



On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote:

As an example, if I want to get a detailed directory listing in
Terminal, I use:   ls -la
In Rev, I would use:  put shell("ls -la") into fld "Listing"


But what if I need to look into a locked directory, one that in terminal I'd use sudo ls -la ? How do I pass the command and the password. In Terminal I always do the sudo + command, it then asks for my password which I enter.
How do I do these 2 steps in Rev?

Here is the way I do it:

   -- specify the shell command to use
   put "ls -la" into tCmd
   -- build the series of shell commands to sudo this
   put "#!/bin/sh" & cr into tScript
   put "pw=" & quote & tPass & quote & cr after tScript
   put "echo $pw | sudo -S " & tCmd & cr after tScript
   -- do the complete shell command
   put shell(tScript) into tCheck  -- do the command & get the result

You can either ask for the password each time, or store it in a custom
property or global for future reference.

Cheers,
Sarah

--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to