Signed-off-by: Bill Nottingham <notting(a)redhat.com>
---
pyanaconda/network.py | 34 ----------------------------------
scripts/upd-instroot | 4 +++-
2 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index b37c074..304b1c0 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -756,40 +756,6 @@ class Network:
# /etc/resolv.conf is managed by NM
- # /etc/udev/rules.d/70-persistent-net.rules
- rules = "/etc/udev/rules.d/70-persistent-net.rules"
- if not os.path.isfile(rules):
- f = open(rules, "w")
- f.write("""
-# This file was automatically generated by the /lib/udev/write_net_rules
-# program run by the persistent-net-generator.rules rules file.
-#
-# You can modify it, as long as you keep each rule on a single line.
-
-""")
- for dev in self.netdevices.values():
- addr = dev.get("HWADDR")
- if not addr:
- continue
- devname = dev.iface
- basename = devname
- while basename != "" and basename[-1] in string.digits:
- basename = basename[:-1]
-
- # rules are case senstive for address. Lame.
- addr = addr.lower()
-
- s = ""
- if len(dev.description) > 0:
- s = "# %s (rule written by anaconda)\n" % (dev.description,)
- else:
- s = "# %s (rule written by anaconda)\n" % (devname,)
- s = s + 'SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1", KERNEL=="%s*", NAME="%s"\n' % (addr, basename, devname,)
-
- f.write(s)
-
- f.close()
-
def waitForDevicesActivation(self, devices):
waited_devs_props = {}
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 0cf987d..5c8d5b5 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -1333,7 +1333,9 @@ rm -rf $DEST/boot $DEST/home
# Remove a bunch of stuff we don't want in the final image.
find $DEST -name "*.a" | grep -v kernel-wrapper/wrapper.a | xargs rm -rf
find $DEST -name "lib*.la" |grep -v "usr/$LIBDIR/gtk-2.0" | xargs rm -rf
-rm -f $DEST/lib/udev/rules.d/*generator*
+for i in $DEST/lib/udev/rules.d/*generator* ; do
+ [[ "$i" =~ net-generator ]] || rm -f $i
+done
# nuke some python stuff we don't need
for d in idle distutils bsddb lib-old hotshot doctest.py pydoc.py site-packages/japanese site-packages/japanese.pth ; do
--
1.7.4