Tiny Core Base > TCB Talk
change eth0 and eth1 with udev rules
(1/1)
halma:
Hi,
is it correct that i can use /etc/udev/rules.d/70-persistent-net.rules to change eth0 to eth1 and eth1 to eth0 or which file is used under TC for doing this ?
Rich:
Hi halma
You could try:
--- Code: ---SUBSYSTEM=="net", ATTR{address}=="ab:cd:ef:12:34:56", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="65:43:21:fe:dc:ba", NAME="eth1"
--- End code ---
That was found here:
https://bbs.archlinux.org/viewtopic.php?id=140029
The ATTR{address}== refers to the network adapters MAC address.
curaga:
Try ifrename as well, it's been mentioned here before.
halma:
Hi Rich and Curaga, my qestion was, what is the correct file name/Stage unter TC for doing this ? sorry for my bad english
Rich:
Hi halma
As is often the case there can be multiple ways of doing something under Linux. If you don't want to use udev you can try adding
this to your /opt/bootsync.sh file:
--- Code: ---# Assign unused names to the network cards
nameif want_eth0 ab:cd:ef:12:34:56
nameif want_eth1 65:43:21:fe:dc:ba
# Assign the desired names to the network cards
nameif eth0 ab:cd:ef:12:34:56
nameif eth1 65:43:21:fe:dc:ba
--- End code ---
If your opt directory is not persistent, run a backup and reboot. The nameif command is the busybox version of renameif.
If you do try the udev way you probably need to ad this to your /opt/bootsync.sh file:
--- Code: ---udevadm control --reload-rules
udevadm trigger
--- End code ---
Navigation
[0] Message Index
Go to full version