[PATCH rhel7-alpha2-branch 1/2] dracut parse-kickstart: fix 'nfs --opts ...'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We were putting the ops at the end; they're actually supposed to in
front of the server. Whoops.

Also, use .format() in all the string formatting in Method, for
consistency's sake.
---
 dracut/parse-kickstart |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index aa4e0e8..acb41ea 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -32,13 +32,14 @@ class Method(commands.method.F14_Method):
             method="cdrom"
         elif self.method == "harddrive":
             if self.biospart:
-                method="bd:%s:%s" % (self.partition, self.dir)
+                method="bd:{0.partition}:{0.dir}".format(self)
             else:
-                method="hd:%s:%s" % (self.partition, self.dir)
+                method="hd:{0.partition}:{0.dir}".format(self)
         elif self.method == "nfs":
-            method="nfs:%s:%s" % (self.server, self.dir)
             if self.opts:
-                method += ":%s" % self.opts
+                method="nfs:{0.opts}:{0.server}:{0.dir}".format(self)
+            else:
+                method="nfs:{0.server}:{0.dir}".format(self)
         elif self.method == "url":
             # FIXME: self.proxy, self.noverifyssl
             method = self.url
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux