summaryrefslogtreecommitdiffstats
path: root/iw/task_gui.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-12-03 15:12:30 +0100
committerRadek Vykydal <rvykydal@redhat.com>2009-12-03 15:19:43 +0100
commit22e0f8532c707c05bdfd841f53e06181832ff5fe (patch)
treee80ab11df11c7c1591f2bffdf1efb82dc56a5f3f /iw/task_gui.py
parent3df62f5157c8dd930b0c98bfecc64f558867965b (diff)
downloadanaconda-22e0f8532c707c05bdfd841f53e06181832ff5fe.tar.gz
anaconda-22e0f8532c707c05bdfd841f53e06181832ff5fe.tar.xz
anaconda-22e0f8532c707c05bdfd841f53e06181832ff5fe.zip
Enable method/repo nfs options in stage2.
In stage 2, the nfs options given in repo= boot parameter were malparsed, in UI they were ignored. Note that now the options can get to stage 2 only via method=/repo= boot parameter. Ks nfs option --opts works only when its url specifies stage2 (i.e. ends with images/install.img). In cases when method (--repo parameter for anaconda python script) is inferred from stage2, nfs options of stage2 "nfs:..." url aren't passed to stage 2.
Diffstat (limited to 'iw/task_gui.py')
-rw-r--r--iw/task_gui.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/iw/task_gui.py b/iw/task_gui.py
index 1af485653..cb7ab0628 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -32,6 +32,7 @@ import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
import network
+import iutil
from yuminstall import AnacondaYumRepo
import yum.Errors
@@ -204,13 +205,10 @@ class RepoEditor:
self.proxyCheckbox.set_active(False)
self.proxyTable.set_sensitive(False)
elif url.startswith("nfs"):
- method_server_dir = url.split(":")
- try:
- self.nfsServerEntry.set_text(method_server_dir[1])
- self.nfsPathEntry.set_text(method_server_dir[2])
- except IndexError:
- pass
- self.nfsOptionsEntry.set_text("")
+ (opts, server, path) = iutil.parseNfsUrl(url)
+ self.nfsServerEntry.set_text(server)
+ self.nfsPathEntry.set_text(path)
+ self.nfsOptionsEntry.set_text(opts)
elif url.startswith("cdrom:"):
pass
elif url.startswith("hd:"):
@@ -304,6 +302,9 @@ class RepoEditor:
path = self.nfsPathEntry.get_text()
path.strip()
+ options = self.nfsOptionsEntry.get_text()
+ options.strip()
+
repo.name = self.nameEntry.get_text()
if not server or not path:
@@ -315,7 +316,7 @@ class RepoEditor:
dest = tempfile.mkdtemp("", repo.name.replace(" ", ""), "/mnt")
try:
- isys.mount("%s:%s" % (server, path), dest, "nfs")
+ isys.mount("%s:%s" % (server, path), dest, "nfs", options=options)
except Exception as e:
self.intf.messageWindow(_("Error Setting Up Repository"),
_("The following error occurred while setting up the "
@@ -323,7 +324,7 @@ class RepoEditor:
return False
repo.baseurl = "file://%s" % dest
- repo.anacondaBaseURLs = ["nfs:%s:%s" % (server,path)]
+ repo.anacondaBaseURLs = ["nfs:%s:%s:%s" % (options,server,path)]
return True
def _applyHd(self, repo):
@@ -441,12 +442,15 @@ class RepoMethodstrEditor(RepoEditor):
path = self.nfsPathEntry.get_text()
path.strip()
+ options = self.nfsOptionsEntry.get_text()
+ options.strip()
+
if not server or not path:
self.intf.messageWindow(_("Error"),
_("Please enter an NFS server and path."))
return False
- return "nfs:%s:%s" % (server, path)
+ return "nfs:%s:%s:%s" % (options, server, path)
def _applyHd(self):
return None