AW: [Xorp-cvs] XORP cvs commit: xorp/rtrmgr

Pavlin Radoslavov pavlin@icir.org
Fri, 11 Nov 2005 09:38:52 -0800


> Nice would I be possible to change Prompt in the way that the domain is
> stript off: on my system I see
> 
> root@dedus033.rscdus.retail-sc.com> 
> 
> but it would be nicer to have:
> 
> root@dedus033#

I just checked with Juniper, and they don't strip the domain
part. Hence, for consistency reason I'd prefer to keep it the way it
is.

> The Part with the Environment Vars. Is nice but when running as cli you
> don't have the chance to set this, wouldn't It be nicer to do this in the
> config somewhere below rtrmgr I think. 

Yes, we would like to make the xorpsh behavior more configurable,
but this will be a major task on its own and currently such task is
not high on our priority list. Once we have it implemented,
eventually it could allow you to reconfigure xorpsh to strip the
domain part.
In the mean time you could use a simple shell wrapper like this one
to call xorpsh and to set the prompt with the domain name
stripped-off:

#!/bin/sh

username=`id -un`
hostname=`hostname -s`

export XORP_OPERATIONAL_MODE_PROMPT="${username}@${hostname}> "
export XORP_CONFIGURATION_MODE_PROMPT="${username}@${hostname}# "
/usr/local/xorp/bin/xorpsh


If you name the above script "xorpsh", just make sure that its
location is in your path before /usr/local/xorp/bin (or whatever
place the real xorpsh is installed in).

Pavlin

> 
> Gruss 
>    Patrick Marc Preuss 
>     
> 
> -----Ursprüngliche Nachricht-----
> Von: xorp-cvs-admin@icir.org [mailto:xorp-cvs-admin@icir.org] Im Auftrag von
> Pavlin Radoslavov
> Gesendet: Freitag, 11. November 2005 05:39
> An: xorp-cvs@icir.org
> Betreff: [Xorp-cvs] XORP cvs commit: xorp/rtrmgr
> 
> CVSROOT:	/usr/local/share/doc/apache/cvs
> Module name:	xorp
> Changes by:	pavlin@xorpc.icir.org	2005-11-11 04:38:31 UTC
> 
> XORP CVS repository
> 
> 
> Modified files:
> 	rtrmgr        cli.cc cli.hh 
> 
> Log message:
> 	* Change the default operational and configuration mode prompts
> 	  from "Xorp> " and "XORP> " to "user@host> " and "user@hostname# "
> 	  respectively.
> 	
> 	* On startup check the environmental variables
> 	  XORP_OPERATIONAL_MODE_PROMPT and XORP_CONFIGURATION_MODE_PROMPT
> 	  and if defined use them to overwrite the operational and
> 	  configuration mode prompts respectively.
> 	
> 	* Minor refactoring in getting the user name.
> 	
> 	This fixes bugzilla entry #188.
> 	
> 	Bugzilla URL:   http://www.xorp.org/bugzilla/show_bug.cgi?id=188
> 
> Revision  Changes                                  Path
> 1.106     +100 -27;  commitid: 12a8f43741c8d7ea6;  xorp/rtrmgr/cli.cc
> 1.39      +6 -1;  commitid: 12a8f43741c8d7ea6;     xorp/rtrmgr/cli.hh
> _______________________________________________
> Xorp-cvs mailing list
> Xorp-cvs@icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs
> 
> 
> 
> 
> _______________________________________________
> Xorp-cvs mailing list
> Xorp-cvs@icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs