HAL/UDEV ! I need help to get them working !
I am lost and confused by the developments over hotplug, hal and udev. The changeover from hotplug to hal/udev has been so fast that appropriate documentation is not easily accessible. To make it worse, SuSE has changed the behaviour of hal/udev. In the end, I can't get what I want !
Here's the scenario:
I have installed SuSE 10.0 on the internal HDD of my laptop. At home I plug in a 300 gigs Maxtor drive thru' IEEE1394 firewire. I want to thave a 16 gig reiserfs partition mounted on /home whenever I plug it in. When I take my laptop out ofcourse with the Maxtor unplugged, I still have a working /home tree (As this directory exists on my root partition). WHen I get back home and plug in Maxtor drive all the files under /home that are newer than those on Maxtor get copied to Maxtor drive and then the partition is mounted on /home !
I have tried to do this thru' autofs. But, there is what seems to be a bug in SuSE's implementation of hal/udev. The format described in auto.master differs from what is described in man page. To make it worse, /etc/init.d/autofs script is not workable ! After having defined the auto.master maps and the associated map file the script autofs simply fails to work. I have tried both ways i.e. following the format described in auto.master as well as what is described in the man page. I have walked thru' the scrip autofs and obviously I've realized that it is not workable.
To circumvent the above, I created my own autofs script which passes the correct args to /usr/sbin/automount and it works. The downside - When Maxtor drive is unplugged the directory /home appears to be empty and thus is not accessible, cause automount is sitting on top of this directory watching it everytime it is accessed !
I know the only way out is thru' a udev script. I do not have any idea as to how this has been implemented in SuSE and it would take quite a long time to thru' all that source code !! :-))
Has anyone knowledge on the workings of hal/udev and can tell me where would I place my script which would do the copy and mount operation while, hal/udev will do the job of calling my script whenever the Maxtor drive is plugged in.
Thanks for any help that would come by.
You seem to have far more background knowledge in this field than I have, but I'd suggest to use not the same mountpoint on both your external and internal drive. In this case a simple bash-script could do the job.
|All times are GMT -5. The time now is 12:20 PM.|