Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Dynamically determinig fstab file name

by rgren925 (Beadle)
on Nov 23, 2022 at 17:51 UTC ( #11148333=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2023-10-01 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?