On Wed, Feb 28, 2007 at 02:47:36PM +0900, Nobuhiro Itou wrote: > Hi, Dan > > Would you give me a comment on this patch? > If not, please apply it. > > I think virt-install should check the VNC port number that the user cannot specify. Sorry, I missed it first time around. It looks good - although it 5900 is a valid port number to use, so I'll just s/5901/5900/ when applying it. > > > When I execute "virt-install --vnc --vncport=5900", domain starts > > with 5900 + domain ID. > > I think that it is necessary to check, because we cannot appoint > > the VNC port number equal to or less than 5900. > > > > The attached patch adds to check the VNC port number. > > > > Signed-off-by: Nobuhiro Itou <fj0873gn@xxxxxxxxxxxxxxxxx> > > > > Index: virtinst/Guest.py (python-virtinst-0.101.0) > =================================================================== > --- Guest.py 2007-02-28 23:18:37.000000000 +0900 > +++ Guest.py.vncport_check 2007-02-28 14:15:49.000000000 +0900 > @@ -179,7 +179,9 @@ class XenGraphics(VirtualGraphics): > class VNCVirtualGraphics(XenGraphics): > def __init__(self, *args): > self.name = "vnc" > - if len(args) >= 1 and args[0]: > + if len(args) >= 1 and not args[0] is None: > + if args[0] < 5901: > + raise ValueError, "Invalid value for vncport, vncport must be no less than 5901" > self.port = args[0] > else: > self.port = -1 Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|