[patch] progress with autofs.

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri Sep 24 02:34:08 PDT 2004


On Fri, Sep 24, 2004 at 02:37:52AM +0200, David Zeuthen wrote:
> 
> Hi,
> 
> In my view it would really be better if there was a dedicated callout
> modifying /etc/auto.hal rather than putting this functionality into
> fstab-sync. 

 well, the changes are pretty minimal: about 98 to 99% of the code is
 identical between fstab-sync and fstab-sync-doing-autofs.

 a few tweaks to read and write parameters in a different order
 to cope with /etc/auto.hal instead of /etc/fstab, replacing
 FSTAB_SYNC_ROOT_PATH with a char* which is initialised in
 main(), that sort of thing.

 very very obvious non-impacting changes.

 about the only one with any "complexity" is that i'm going to have to
 read the /etc/auto.hal file in order to determine the mountpoint and to
 always always always add a "volume.automount_point" into the HAL
 database rather than bombing out just because the mountpoint entry
 happens to already be in /etc/auto.hal.


> Just separating functionality. 

 if you're happy to have two near-identical programs, fstab-sync.c
 and autofs-sync.c, fine.

 i can if you like split out the common code into a library, but to be
 honest i don't think it's worth the effort: 98% of the code presently
 in fstab-sync.c would end up in the library.


 ... if i were to take the autofs "script" approach and use
 /etc/auto.hal.sh instead, then i would revert some of the changes and
 make /etc/auto.hal.sh read an fstab-formatted file instead of an
 autofs-style one.

 so there would be even _less_ differences!

 
> So, what I'm thinking is that this is just a third way to enforce policy
> using hal. Hence, why I like the separation. Also, the changes to hald
> seems to be pretty minimalistic, if any, given your message below, is
> this correct? 

 yes, they are minimalistic, and also i'm suggesting additions to the
 hal db format so that the impact on expectations of userspace programs
 is even less.

 i think it necessary that volume managers explicity code in support for
 autofs-managed partitions.


> It would be good to have a configure option to turn this
> on and off.

 done that already.

-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl at lkcl.net"> lkcl at lkcl.net </a> <br />

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list