Hi, attached you will find a improved and more robust version of if2mac initscript and a example configuration file. The script is tested only on 2 systems, my desktop (3 nics) and my router (12 nics + wlan) and seems to work so far. If there are any bold testers who want to give it a try their feedback, hints, critics and improvements are appreciated.
What works: 1) basic renaming of interfaces based on configuration file is stable. 2) Interfaces of type en*, et*, wl* unknown to the config file are added to the end of the list on the fly and renamed too as they would stay as ethXrenamed after the first pass. A warning is printed and the user is invited to add them to the config file. If you know a better solution please tell me. What doesn't work: 1) I cannot get to log if2mac to /var/log/boot on one box but I'm sure it runs as I see the messages about the renamed interfaces in dmesg. Could be just a wrong configuration or something I changed and cannot recall. What I removed from this version: 1) I attempted integration with udev/eudev by generating a 70-persistent-net.rules file on the fly at boot so that if drivers are rmmod and insmod again there is at least a minimal chance that they get the same name as before (udev can still fail at it if you add more than one interface at once). File creation part worked, but at the next reboot udev/eudev tried to use it and made a mess. Ideally it should be removed at shutdown/reboot but in case of a crash or blackout it would be still there at boot making trouble. In the end I removed it as udev/eudev is not reliable in doing this renaming anyway if you have more than than a few interfaces. Ciao, Tito
if2mac
Description: Binary data
if2mac.conf
Description: Binary data
_______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng