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

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



Ack.

On 05/03/2010 07:48 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 20ae4a0..2486164 100755
--- a/anaconda
+++ b/anaconda
@@ -147,10 +147,12 @@ def setupPythonUpdates():
                                                                          f),
                                 "/tmp/updates/%s/%s" %(pypkg, 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):


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