summaryrefslogtreecommitdiffstats
path: root/pyanaconda/vnc.py
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-02-10 16:00:20 -0500
committerWill Woods <wwoods@redhat.com>2012-03-16 12:35:53 -0400
commit85f6dc2baae051f4f99db82fc64c89c53cf5611a (patch)
tree0ee79e74184b1abc1f6a89bff17dcd4a87703888 /pyanaconda/vnc.py
parent9bb2110ce77638f2773324272813deb2c7f3bc1c (diff)
downloadanaconda-85f6dc2baae051f4f99db82fc64c89c53cf5611a.tar.gz
anaconda-85f6dc2baae051f4f99db82fc64c89c53cf5611a.tar.xz
anaconda-85f6dc2baae051f4f99db82fc64c89c53cf5611a.zip
move vncpassword handling into anaconda; remove recoverVNCPassword
loader was writing the vncpassword out to a file, because: a) many years ago, VNC got started by loader, and b) VNC used to need to read its password from a file. But now it is the Glorious Future and anaconda can just read the 'vncpassword' boot/cmdline arg and hand it to the VncServer object. This also removes recoverVNCPassword and pw_init_file from the VncServer class, and the tests associated with them.
Diffstat (limited to 'pyanaconda/vnc.py')
-rw-r--r--pyanaconda/vnc.py19
1 files changed, 1 insertions, 18 deletions
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 47e42eb29..784d5f7cb 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -44,7 +44,7 @@ class VncServer:
def __init__(self, display="1", root="/", ip=None, name=None,
desktop="Desktop", password="", vncconnecthost="",
vncconnectport="", log_file="/tmp/vncserver.log",
- pw_file="/tmp/vncpassword", pw_init_file="/tmp/vncpassword.dat"):
+ pw_file="/tmp/vncpassword"):
self.display = display
self.root = root
self.ip = ip
@@ -55,27 +55,10 @@ class VncServer:
self.vncconnectport = vncconnectport
self.log_file = log_file
self.pw_file = pw_file
- self.pw_init_file = pw_init_file
self.connxinfo = None
self.anaconda = None
self.log = logging.getLogger("anaconda.stdout")
- def recoverVNCPassword(self):
- """Rescue the vncpassword from where loader left it
-
- We are not to check for validity yet, if there is a file
- pass it to the variable, if there is not, set the var
- to ''. We will check valididty later.
- """
- # see if there is a vnc password file
- try:
- pfile = open(self.pw_init_file, "r")
- self.password=pfile.readline().strip()
- pfile.close()
- os.unlink(self.pw_init_file)
- except (OSError, IOError):
- self.password=""
-
def setVNCPassword(self):
"""Set the vnc server password. Output to file. """