On Tue, 2002-09-10 at 14:13, Jeff Waugh wrote: > > How do I tell in perl-speak (ie without rewriting the whole thing in > > Java) that the mount point succeeded. > > > > I'm happy to put a file on the remote HDD and search for it's existence > > or some such. > > > > If the mount fails, the root filesystem on the server fills as the > > backup proceeds to /mnt/remotedisk. Aarrrgh. > > How about grepping the output of 'mount' for the mountpoint? That's how I'd > do it in bash. :-) >
You can use the return codes - just like $? in shell programming.
Example :
if ( system("mount -t smbfs remoteserver:/mntpoint /mnt 2>/dev/null
1>/dev/null"))
{
do_something;
}
else
{
do_something_else
}
--
Tony Green <[EMAIL PROTECTED]>
Tel : +61-(0)2-9500-9996
signature.asc
Description: This is a digitally signed message part
