On Thu, Aug 09, 2012 at 11:27:36AM -0400, no-re...@cfengine.com wrote:
>Forum: CFEngine Help
>Subject: Re: querying mountpoints
>Author: neilhwatson
>Link to topic: https://cfengine.com/forum/read.php?3,26982,26994#msg-26994
>
>Ideally we like to promise any dependencies. So rather than promsing to 
>install files if this mount is active it is more thourough to promise to mount 
>a filesystem then promise to isntall files if the mount promise is kept or 
>repaired. Either way you'll still need to know about the mount status.
>
>Without a built-in 'ismount' function I would whip up someting involving 
>execresults and the mount command.

...and hope that you don't get stuck when a stat() call on a dead mount
blocks.

On linux, the safest way I've found to check a mount is to query
/proc/mounts (via 'grep' if needed), instead of calling 'mount' and
parsing that output.



-- 
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to