diff options
author | Chris Lumens <clumens@redhat.com> | 2005-11-18 19:54:46 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-11-18 19:54:46 +0000 |
commit | ea0c7a697b09594ceb97b827ed94f8b3416c4365 (patch) | |
tree | 90fcad0ff5301540f1ae42807b6be04e566a0e88 | |
parent | da6a817c371d67685908d530492b5f8ce8b22e41 (diff) | |
download | anaconda-ea0c7a697b09594ceb97b827ed94f8b3416c4365.tar.gz anaconda-ea0c7a697b09594ceb97b827ed94f8b3416c4365.tar.xz anaconda-ea0c7a697b09594ceb97b827ed94f8b3416c4365.zip |
Sync vnc parameters with pykickstart.
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | anaconda | 28 |
2 files changed, 18 insertions, 14 deletions
@@ -1,3 +1,7 @@ +2005-11-18 Chris Lumens <clumens@redhat.com> + + * anaconda: Sync vnc parameter handling with pykickstart. + 2005-11-18 Bill Nottingham <notting@redhat.com> * yuminstall.py: Add ellipsis to match other similar messages @@ -61,8 +61,8 @@ def startMiniWM(root='/'): return childpid # startup vnc X server -def startVNCServer(vncpassword=None, root='/', vncconnecthost=None, - vncconnectport=None): +def startVNCServer(vncpassword="", root='/', vncconnecthost="", + vncconnectport=""): def set_vnc_password(root, passwd, passwd_file): (pid, fd) = os.forkpty() @@ -143,7 +143,7 @@ def startVNCServer(vncpassword=None, root='/', vncconnecthost=None, "DisconnectClients=false", "desktop=%s" % (desktopname,)] # set passwd if necessary - if vncpassword is not None: + if vncpassword != "": try: rc = set_vnc_password(root, vncpassword, "/tmp/vncpasswd_file") except Exception, e: @@ -175,18 +175,18 @@ def startVNCServer(vncpassword=None, root='/', vncconnecthost=None, os.execv(args[0], args) sys.exit (1) - if vncpassword is None: + if vncpassword == "": stdoutLog.warning(_("\n\nWARNING!!! VNC server running with NO PASSWORD!\n" "You can use the vncpassword=<password> boot option\n" "if you would like to secure the server.\n\n")) stdoutLog.info(_("The VNC server is now running.")) - if vncconnecthost is not None: + if vncconnecthost != "": stdoutLog.info(_("Attempting to connect to vnc client on host %s...") % (vncconnecthost,)) hostarg = vncconnecthost - if vncconnectport is not None: + if vncconnectport != "": hostarg = hostarg + ":" + vncconnectport argv = ["/usr/bin/vncconfig", "-display", ":1", "-connect", hostarg] @@ -492,9 +492,9 @@ progmode = None customClass = None kbd = None ksfile = None -vncpassword = None -vncconnecthost = None -vncconnectport = None +vncpassword = "" +vncconnecthost = "" +vncconnectport = "" # # parse off command line arguments @@ -604,11 +604,11 @@ for n in args: pfile.close() os.unlink("/tmp/vncpassword.dat") except: - vncpassword=None + vncpassword="" pass # check length of vnc password - if vncpassword is not None and len(vncpassword) < 6: + if vncpassword != "" and len(vncpassword) < 6: from snack import * screen = SnackScreen() @@ -683,13 +683,13 @@ if ksfile is not None: ksvnchost = ksdata.vnc["host"] ksvncport = ksdata.vnc["port"] - if vncpassword == None: + if vncpassword == "": vncpassword = ksvncpasswd - if vncconnecthost == None: + if vncconnecthost == "": vncconnecthost = ksvnchost - if vncconnectport == None: + if vncconnectport == "": vncconnectport = ksvncport # |