udevd beginner .......

View: New views
1 Messages — Rating Filter:   Alert me  

udevd beginner .......

by 91change :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi ,

       I  am using linux 2.6.22 for my embedded box .  I am using  udev-140 .  I  have only one 50-rules file , in which  2 rules are written . These 2 rules are for  usb-drives .   These are working fine for me .

      I have some applications  like dhclient , udhcpc are started in rcS script . The udevd is  started before mounting all hard drives .


********************** rcS*************************


 mount /mnt/drive1 /dev/sda
 udevstart
 udevd &
 ...........


 

 ManageMyDevices &           // it is doing   , ifconfig eth1 192.168.1.1 up ,  dhclient eth0  etc .....
 ....................
 ....................
 

 *******************************************************

 ManageMyDevices is a elf program written to for all High level api . So  udev rules will call theseAPI thru some interface  to mount usb drives . But if you connect usb drives and boot the embedded box , those API will fails . Becose , by the time  ManageMyDevices is not started .


 To work this correctly , i moved the position of udevd down like the below

********************** rcS*************************


 mount /mnt/drive1 /dev/sda
 


 

 ManageMyDevices &           // it is doing   , ifconfig eth1 192.168.1.1 up ,  dhclient eth0  etc .....
 ....................
 ....................

udevstart
 udevd &
 ...........
 

 *******************************************************



Now everything seems to work ....But if the box boots up and i do ifconfig  .........eth0 is down .......Is udevd should be started before doing ifconfig ..

My understanding ...

 1) udevd rules does not containg rules for eth0
 2) udevd is entirely on userspace
 3) udevd is exclusively used for character , block



Thanks,
Karana .