On Tue, 26 Feb 2002, Stewart Evans wrote:

> Next problem is - checking if a drive is mounted to a variable
> ( eg cat /etc/mtab |  grep /mnt/example ) do as system() or ?

    if (open(MT, "</proc/mounts"))
    {
        while (<MT>)
        {
            if (/^\/mnt\/example/)
            {
...
            }
        }
        unless (close(MT))
        {
...
        }
    }
    else
    {
...
    }

--
Charlie Brady                         [EMAIL PROTECTED]
Lead Product Developer
Network Server Solutions Group        http://www.e-smith.com/
Mitel Networks Corporation            http://www.mitel.com/
Phone: +1 (613) 368 4376 or 564 8000  Fax: +1 (613) 564 7739




--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to