> One more thing:  Watch out for empty lines at the end of the files

 

Oh yeah, seemed to be a CR/LF vs CR thing.

 

https://bugzilla.vyatta.com/show_bug.cgi?id=1880

 

stig

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: Tuesday, September 18, 2007 11:29 AM
To: vyatta-users@mailman.vyatta.com
Subject: Re: [Vyatta-users] Using xorpsh non-interactively

 

One more thing:  Watch out for empty lines at the end of the files.

You can get all sorts of problems then. Should be in the mail or bugzilla
archives, can't remember which....

Jon

On 9/18/07, Stig Thormodsrud < <mailto:[EMAIL PROTECTED]>  [EMAIL PROTECTED]>
wrote:

> Hi,
>
> I need to set a few 'configure' paramters 
> non-interactively as soon as the router boots up. For
> instance, to set the host-name I run:
> xorphsh -c "configure set system host-name myrouter1"
> xorphsh -c "configure commit" 
>
> That doesn't seem to work. Can someone please tell me
> the correct incantation for xorpsh in non-interactive
> mode ?

I think you can feed it a file with your commands such as:

cat > /tmp/foo
configure
set system host-name jimbob
commit
^d

Then: xorpsh < /tmp/foo

Or from a shell script:

#!/bin/sh
xorpsh <<!
configure
set system host-name joebob 
commit
!

Hope that works for you.

stig

>
> Thanks
> Ramaswamy
>
>
>
>
__________________________________________________________________________
> __________ 
> Pinpoint customers who are looking for what you sell.
> http://searchmarketing.yahoo.com/ 
> _______________________________________________
> Vyatta-users mailing list 
> Vyatta-users@mailman.vyatta.com
> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
<http://mailman.vyatta.com/mailman/listinfo/vyatta-users> 

_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com 
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

 

_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

Reply via email to