Re: [PATCH] Make the rule for 70-anaconda.rules in updates.img be generic.

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

 



Ack.

On 04/14/2010 07:30 PM, Peter Jones wrote:
This makes it possible to replace any udev *.rules file in an updates
image.
---
  anaconda |   10 ++++++----
  1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/anaconda b/anaconda
index 68e5fbb..188abf6 100755
--- a/anaconda
+++ b/anaconda
@@ -132,10 +132,12 @@ def setupPythonUpdates():

              os.symlink("%s/%s" % (dest, f), "/tmp/updates/%s/%s" % (pkg, f))

-    if os.access("/tmp/updates/70-anaconda.rules", os.R_OK):
-        import shutil
-        shutil.copyfile("/tmp/updates/70-anaconda.rules",
-                        "/etc/udev/rules.d/70-anaconda.rules")
+
+    import glob
+    import shutil
+    for rule in glob.glob("/tmp/updates/*.rules"):
+        target = "/etc/udev/rules.d/" + rule.split('/')[-1]
+        shutil.copyfile(rule, target)

  def parseOptions():
      def resolution_cb (option, opt_str, value, parser):

_______________________________________________
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