in reply to Re: Dynamically determinig fstab file name
in thread Dynamically determinig fstab file name

Hi Ken

Thanks very much for the reply.

I just tried your code on RHEL 7. Here's the salient output:

$Sys::Filesystem::FSTAB: undefined $fs->{fstab}: undefined O/S 'linux' supported. Using: Sys::Filesystem::Linux

An environment issue?

Rick

Replies are listed 'Best First'.
Re^3: Dynamically determinig fstab file name
by kcott (Archbishop) on Nov 23, 2022 at 19:04 UTC
    "An environment issue?"

    I don't understand the question. What are you asking about the environment? What issue do think exists?

    Other than "[Ll]inux", instead of "[Cc]ygwin", that's identical to my first four lines of output. I assume you got, but didn't post, subsequent lines about "filesystems found", followed by dd $fs output.

    — Ken

      Sorry. Took a bit of a leap there. I made the (bad) assumption that your output was demonstration but that, perhaps, cygwin didn't output the fstab file name. The fstab value is what I am looking for. I can get all the data from I want from Sys::Filesystem--as long as I have read access to fstab. That's the sticking point. I want the name of the fstab file on that particular system. This code is running on 100k+ systems across several platforms, so I am loathe to make any assumptions.

        I made an alternative suggestion involving sanity checks: is O/S supported (Sys::Filesystem::->supported()) and, if so, does it find any filesystems ($fs->filesystems()).

        If that's insufficient for your needs, and you absolutely must have the fstab path, I'm unable to advise you further.

        — Ken