{"id":1583,"date":"2006-01-04T20:07:00","date_gmt":"2006-01-04T20:07:00","guid":{"rendered":"http:\/\/gleamynode.net\/articles\/1583\/tying-device-name-in-linux-using-udev"},"modified":"2022-12-28T01:47:48","modified_gmt":"2022-12-27T16:47:48","slug":"tying-device-name-in-linux-using-udev","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1583\/tying-device-name-in-linux-using-udev\/","title":{"rendered":"Tying Device Name in Linux Using \u2018udev\u2019"},"content":{"rendered":"
\ub7a9\ud0d1\uc5d0\uc11c \uc708\ub3c4\uc6b0\uc988\ub97c \uc0ac\uc6a9\ud574 \uc654\uc5c8\ub294\ub370, \uc5bc\ub9c8 \uc804\ubd80\ud130 SVN \uc800\uc7a5\uc18c \uccb4\ud06c\uc544\uc6c3\uc774 \ud30c\uc77c\uba85 \uae38\uc774 \uc81c\ud55c \ub54c\ubb38\uc5d0 \uc2e4\ud328\ud574 \uc791\uc5c5\uc5d0 \uc5b4\ub824\uc6c0\uc744 \uacaa\uc5b4 \uc654\uc2b5\ub2c8\ub2e4. \uad81\uc5ec\uc9c0\ucc45\uc73c\ub85c \ub9ac\ub205\uc2a4\ub97c \uc124\uce58\ud558\uace0 WiFi Radar<\/a>\uc640 xsupplicant<\/a>\ub85c \ubb34\uc120\ub79c\ub3c4 \uc131\uacf5\uc801\uc73c\ub85c \uc124\uc815\ud588\uc2b5\ub2c8\ub2e4\ub9cc, \ubd80\ud305\ud560 \ub54c\ub9c8\ub2e4 \uc774\ub354\ub137 \ub514\ubc14\uc774\uc2a4 \uc774\ub984\uc774 eth0 \uac00 \ub418\uc5c8\ub2e4\uac00 eth1 \uc774 \ub418\uc5c8\ub2e4\uac00 \ud558\uc5ec\uc11c \ub9e4\ubc88 \uc124\uc815 \ud30c\uc77c\uc744 \uc190\uc73c\ub85c \uc218\uc815\ud574\uc57c \ud588\uc2b5\ub2c8\ub2e4. \uc624\ub298 \uacb0\uad6d \ucc38\uc9c0 \ubabb\ud558\uace0 \uac80\uc0c9\ud558\uc5ec udev rules \ud30c\uc77c\uc744 \uc791\uc131\ud558\uba74 \ud574\uacb0\ud560 \uc218 \uc788\uc74c\uc744 \uc54c\uac8c \ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 udev rules \ud30c\uc77c\uc758 \uc608\uc785\ub2c8\ub2e4.<\/p>\n I’ve been using Windows on my laptop, but it started to fail to ‘svn co’ thanks to the infamous path length limitation. That’s why I’m on Linux now. It was really easy to configure sophisticated wireless network with WiFi Radar<\/a> and xsupplicant<\/a>. Only one problem was that the order that ethernet devices are detected is somewhat random. My Intel PRO\/Wireless 2100 NIC is usually named as ‘eth0\u2032, but sometimes as ‘eth1\u2032. I had to modify the configuration files whenever the name changes since the last boot. Today, I googled about this issue and found that I can resolve it using a udev rules file. Following is the example of udev rules file:<\/p>\n KERNEL=”eth*”, SYSFS{address}=”<the lower-cased MAC address>”, NAME=”ethwireless” \uc774\uc81c ethernet.rules \ud30c\uc77c\uc744 \uac00\ub9ac\ud0a4\ub294 \uc2ec\ubcfc\ub9ad \ub9c1\ud06c\ub97c \/etc\/udev\/rules.d\/ \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc0dd\uc131\ud574 \uc0c8 \uc124\uc815\uc774 \ub2e4\uc74c \ubd80\ud305\ub54c\ubd80\ud130 \uc801\uc6a9\ub418\ub3c4\ub85d \ud574\uc57c \ud569\ub2c8\ub2e4:<\/p>\n Now, we have to create a symbolic link to this file at \/etc\/udev\/rules.d\/ directory so the new settings get into action from the next boot:<\/p>\n # cd \/etc\/udev\/rules.d \uc7ac\ubd80\ud305\ud558\uae30 \uc804 \/etc\/network\/interfaces \ub098 \/etc\/wifi-radar.conf \uac19\uc740 \ub124\ud2b8\uc6cc\ud06c \uc124\uc815 \uad00\ub828 \ud30c\uc77c\uc758 \uc778\ud130\ud398\uc774\uc2a4 \uc774\ub984\uc744 \uc801\uc808\ud788 \ubcc0\uacbd\ud558\ub294 \uac83\uc744 \uc78a\uc9c0 \ub9c8\uc138\uc694.<\/p>\n Please don’t forget to rename network interface names in configuration files such as \/etc\/network\/interfaces and \/etc\/wifi-radar.conf.<\/p>\n","protected":false},"excerpt":{"rendered":" \ub7a9\ud0d1\uc5d0\uc11c \uc708\ub3c4\uc6b0\uc988\ub97c \uc0ac\uc6a9\ud574 \uc654\uc5c8\ub294\ub370, \uc5bc\ub9c8 \uc804\ubd80\ud130 SVN \uc800\uc7a5\uc18c \uccb4\ud06c\uc544\uc6c3\uc774 \ud30c\uc77c\uba85 \uae38\uc774 \uc81c\ud55c \ub54c\ubb38\uc5d0 \uc2e4\ud328\ud574 \uc791\uc5c5\uc5d0 \uc5b4\ub824\uc6c0\uc744 \uacaa\uc5b4 \uc654\uc2b5\ub2c8\ub2e4. \uad81\uc5ec\uc9c0\ucc45\uc73c\ub85c \ub9ac\ub205\uc2a4\ub97c \uc124\uce58\ud558\uace0 WiFi Radar\uc640 xsupplicant\ub85c \ubb34\uc120\ub79c\ub3c4 \uc131\uacf5\uc801\uc73c\ub85c \uc124\uc815\ud588\uc2b5\ub2c8\ub2e4\ub9cc, \ubd80\ud305\ud560 \ub54c\ub9c8\ub2e4 \uc774\ub354\ub137 \ub514\ubc14\uc774\uc2a4 \uc774\ub984\uc774 eth0 \uac00 \ub418\uc5c8\ub2e4\uac00 eth1 \uc774 \ub418\uc5c8\ub2e4\uac00 \ud558\uc5ec\uc11c \ub9e4\ubc88 \uc124\uc815 \ud30c\uc77c\uc744 \uc190\uc73c\ub85c \uc218\uc815\ud574\uc57c \ud588\uc2b5\ub2c8\ub2e4. \uc624\ub298 \uacb0\uad6d \ucc38\uc9c0 \ubabb\ud558\uace0 \uac80\uc0c9\ud558\uc5ec udev rules \ud30c\uc77c\uc744 \uc791\uc131\ud558\uba74 \ud574\uacb0\ud560… Continue reading
\nKERNEL=”eth*”, SYSFS{address}=”<the lower-cased MAC address>”, NAME=”ethwired”
\nKERNEL=”eth*”, SYSFS{address}=”<the lower-cased MAC address>”, NAME=”ethfirewire”<\/p><\/blockquote>\n
\n# ln -s ..\/ethernet.rules 030_ethernet.rules<\/p><\/blockquote>\n