Blame 0028-resolve-conflict-between-cms-network-rules-and-defau.patch

Harald Hoyer d1bf89
From 8fab6e0463e0b0c70327c2733911098aa56137a7 Mon Sep 17 00:00:00 2001
Harald Hoyer d1bf89
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer d1bf89
Date: Tue, 12 Jun 2012 14:40:43 +0200
Harald Hoyer d1bf89
Subject: [PATCH] resolve conflict between cms network rules and default rules
Harald Hoyer d1bf89
Harald Hoyer d1bf89
---
Harald Hoyer d1bf89
 modules.d/40network/net-genrules.sh |    2 +-
Harald Hoyer d1bf89
 modules.d/80cms/cmssetup.sh         |    2 ++
Harald Hoyer d1bf89
 2 files changed, 3 insertions(+), 1 deletion(-)
Harald Hoyer d1bf89
Harald Hoyer d1bf89
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
Harald Hoyer d1bf89
index 2d3dff2..99d0fe5 100755
Harald Hoyer d1bf89
--- a/modules.d/40network/net-genrules.sh
Harald Hoyer d1bf89
+++ b/modules.d/40network/net-genrules.sh
Harald Hoyer d1bf89
@@ -53,7 +53,7 @@ fix_bootif() {
Harald Hoyer d1bf89
 
Harald Hoyer d1bf89
     # Default: We don't know the interface to use, handle all
Harald Hoyer d1bf89
     else
Harald Hoyer d1bf89
-        printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup"
Harald Hoyer d1bf89
+        printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" > /etc/udev/rules.d/61-default-net.rules
Harald Hoyer d1bf89
     fi
Harald Hoyer d1bf89
 
Harald Hoyer d1bf89
 } > /etc/udev/rules.d/60-net.rules
Harald Hoyer d1bf89
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
Harald Hoyer d1bf89
index 41c853c..2208803 100755
Harald Hoyer d1bf89
--- a/modules.d/80cms/cmssetup.sh
Harald Hoyer d1bf89
+++ b/modules.d/80cms/cmssetup.sh
Harald Hoyer d1bf89
@@ -166,6 +166,8 @@ processcmsfile()
Harald Hoyer d1bf89
         fi
Harald Hoyer d1bf89
 
Harald Hoyer d1bf89
 	printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", KERNELS=="%s", ENV{INTERFACE}=="?*", RUN+="/sbin/initqueue --onetime --unique --name cmsifup-$env{INTERFACE} /sbin/cmsifup $env{INTERFACE}"\n' "$driver" "$devbusid" > /etc/udev/rules.d/99-cms.rules
Harald Hoyer d1bf89
+        # remove the default net rules
Harald Hoyer d1bf89
+        rm -f /etc/udev/rules.d/61-default-net.rules
Harald Hoyer d1bf89
 	[[ -f /etc/udev/rules.d/60-net.rules ]] \
Harald Hoyer d1bf89
 	    || printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' >> /etc/udev/rules.d/99-cms.rules
Harald Hoyer d1bf89