in reply to Re^3: How best test that a directory is a mount point of a mounted filesystem?
in thread How best test that a directory is a mount point of a mounted filesystem?
Sorry, I messed up with the file names. Obviously it needs to be the other way around ;)
if($^O eq 'linux') { $mtab = '/etc/mtab'; } else { $mtab = '/etc/mnttab'; }
You could (and probably should) specify solaris for the else-clause, but I'm not sure what $^O yields on Solaris.. Probably just 'solaris'.
Also don't forget to close the file after all that:
close $mounts;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How best test that a directory is a mount point of a mounted filesystem?
by regexes (Hermit) on Jan 28, 2009 at 12:26 UTC |