FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-25-2010, 01:35 AM
Dirk
 
Default expect does not expect anything

#!/usr/bin/expect -f

spawn rsync -r --progress a u@bla.com:/b
expect "assword:"
send "password
"
expect "hostname"


why does this script stop while rsync is still transferring?


(hostname is the name of the host in the prompt)


and, yes, it HAS TO BE done using expect... any answer including the word "keys" will not be helpful



Thanks,

Dirk


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C4B94FF.6060802@gmx.net">http://lists.debian.org/4C4B94FF.6060802@gmx.net
 
Old 07-25-2010, 01:36 AM
Dirk
 
Default expect does not expect anything

#!/usr/bin/expect -f

spawn rsync -r --progress a u@bla.com:/b
expect "assword:"
send "password
"
expect "hostname"


why does this script stop while rsync is still transferring?


(hostname is the name of the host in the prompt)


and, yes, it HAS TO BE done using expect... any answer including the word "keys" will not be helpful



Thanks,

Dirk


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C4B952F.70707@gmx.net">http://lists.debian.org/4C4B952F.70707@gmx.net
 
Old 07-25-2010, 01:52 AM
Mike Bird
 
Default expect does not expect anything

On Sat July 24 2010 18:36:47 Dirk wrote:
> #!/usr/bin/expect -f
>
> spawn rsync -r --progress a u@bla.com:/b
> expect "assword:"
> send "password
"
> expect "hostname"
>
>
> why does this script stop while rsync is still transferring?
>
>
> (hostname is the name of the host in the prompt)
>
>
> and, yes, it HAS TO BE done using expect... any answer including the word
> "keys" will not be helpful

From "man rsync":

Some modules on the remote daemon may require authentication. If so,
you will receive a password prompt when you connect. You can avoid the
password prompt by setting the environment variable RSYNC_PASSWORD to
the password you want to use or using the --password-file option. This
may be useful when scripting rsync.

WARNING: On some systems environment variables are visible to all
users. On those systems using --password-file is recommended.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201007241852.56456.mgb-debian@yosemite.net">http://lists.debian.org/201007241852.56456.mgb-debian@yosemite.net
 
Old 07-25-2010, 01:57 AM
Dirk
 
Default expect does not expect anything

Mike Bird wrote:
> On Sat July 24 2010 18:36:47 Dirk wrote:
>> #!/usr/bin/expect -f
>>
>> spawn rsync -r --progress a u@bla.com:/b
>> expect "assword:"
>> send "password
"
>> expect "hostname"
>>
>>
>> why does this script stop while rsync is still transferring?
>>
>>
>> (hostname is the name of the host in the prompt)
>>
>>
>> and, yes, it HAS TO BE done using expect... any answer including the word
>> "keys" will not be helpful
>
> From "man rsync":
>
> Some modules on the remote daemon may require authentication. If so,
> you will receive a password prompt when you connect. You can avoid the
> password prompt by setting the environment variable RSYNC_PASSWORD to
> the password you want to use or using the --password-file option. This
> may be useful when scripting rsync.
>
> WARNING: On some systems environment variables are visible to all
> users. On those systems using --password-file is recommended.
>
> --Mike Bird
>
>

does not work


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C4B9A25.4020206@gmx.net">http://lists.debian.org/4C4B9A25.4020206@gmx.net
 

Thread Tools




All times are GMT. The time now is 07:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org