Quote:
Originally Posted by aus9
hi
on my system it has this warning inside file....# 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, and change only the value of the NAME= key.
2) there are 2 ways around this both not using that file
a) put your script into /etc/rcS with a number starting with S and higher than networking using root powers.
b) a lot easier...add the script to rc.local with root powers as rc.local is always the Last script to execute so you can't muck it up
|
In my 70-persistent-net.rules file there is written that it has been generated by... but not the part of only change the NAME value.
I tried the
b solution and it works fine, but I would use the udev system. I could use the
a solution if it is not possible to use udev.
This is the motivation about what I can do that:
I have 3 PCs with the same Hardware, so I would umount the primary disk on a machine and put it on another one.
The problem is that the network does not working because the MAC address changes.
The easiest solution is to delete the
HWADDR field in
/etc/sysconfig/network-script/ifcfg-eth* and then it works, but evry time the eth* increases.
So my idea is to create 2 udev rules:
1) 69-remove-persistent-net.rules: it deletes the 70-persistent-net.rules
2) 99-config-eth.rules: it reads the 70-persistent-net.rules and then modifies the /etc/sysconfig/network-script/ifcfg-eth* with the correct MAC address
I prefer to use udev, it it works