Configure SNMP to work on read-only RPi using tempFilePattern

Raspbian Jessie.

How can I configure SNMP to work with a pass command (shell script) on a read-only disk? I read that smnp.conf can have a tempFilePattern specified, but what should I use? Tried /var/log and it doesn't seem to work (no such instance exists at this OID). The SNMP/pass works perfectly with a RW file system. Does the Raspberry Pi version of Jessie even use that variable?

I think the RPi may have been configured with something like the following. It's the Pi-Star image for use with MMDVM.

formatting link

Thanks!

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor
Loading thread data ...

Raspbian Jessie.

How can I configure SNMP to work with a pass command (shell script) on a read-only disk? I read that smnp.conf can have a tempFilePattern specified, but what should I use? Tried /var/log and it doesn't seem to work (no such instance exists at this OID). The SNMP/pass works perfectly with a RW file system. Does the Raspberry Pi version of Jessie even use that variable?

I think the RPi may have been configured with something like the following. It's the Pi-Star image for use with MMDVM.

formatting link

Thanks!

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

Configure SNMP to work on read-only RPi using tempFilePattern

Raspbian Jessie.

How can I configure SNMP to work with a pass command (shell script) on a read-only disk? I read that smnp.conf can have a tempFilePattern specified, but what should I use? Tried /var/log and it doesn't seem to work (no such instance exists at this OID). The SNMP/pass works perfectly with a RW file system. Does the Raspberry Pi version of Jessie even use that variable?

I think the RPi may have been configured with something like the following. It's the Pi-Star image for use with MMDVM.

formatting link

Thanks!

--
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

On Sat, 25 Nov 2017 14:15:00 +0000, David Taylor declaimed the following:

That make five times you've posted this message today. If you don't get an answer by Monday night (after all, it is a weekend -- and holiday weekend for the US -- so may be fewer readers around) then try giving a better description.

Based upon

formatting link
I'd assume you would still need to provide some location on the file system that is RW...

""" The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file.

The last six characters of template must be "XXXXXX" and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file. """

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Dennis,

Thanks for the reply.

I must apologise for the multiple postings, but each time I posted (a) Thunderbird said "The newsgroup ... does not exist" or something like that and (b) reading the newsgroup didn't sho my message. Fixed by adding an e-mail address to the Server properties. If I can delete the unanswered messages I would. Doesn't seem to be an option on Thunderbird. All this because eternal-september appears not to be 100%.

To explain in more detail:

So far:

- doing nothing results in the OID reported as not being present with the defaults. Supposedly that uses /tmp, and I can create a file in /tmp even when the disk is read-only, even as a non-priv user.

- I tried adding tempFilePattern to /etc/snmp/snmp.conf, and rebooting, and it didn't seem to make any difference.

So it's as if either the "tmp" isn't working (which seems unlikely), or that snmpd isn't using /tmp, or ????

Not sure what they mean by "character array", I guess that's just in the API call so you can access the file, for snmp.conf you just add the line:

tempFilePattern /tmp/snmpdXXXXXX

Cheers!

--
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

On Sun, 26 Nov 2017 07:01:08 +0000, David Taylor declaimed the following:

Well... so much for both of my hypotheses...

Sorry...

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.