On Fri, 22 May 2015 13:53:43 +0100, Richard Kettlewell
wrote:
There are some things to get right if using /tmp.
1. If the environment variable TMPDIR is set, use that instead of /tmp.
I would add to that, if it isn't set, set it as pointing to /tmp
As a possibly interesting aside which may help some users of embedded
devices, some programs / programming environments have a need or use
of TMPDIR, for example PERL, but this may not always be well
documented. One of the reasons for GetIPlayer or cpan update failing
on embedded devices can be either this variable is not set by the OEM
firmware's default boot up, or else it points to a very limited amount
of on-chip ram. The following sequence of actions in a user post-boot
script can resolve this difficulty, where hard-disk should be
replaced by the normal means of accessing the hard disk of the NAS or
media player in question:
1 if [ ! -d hard-disk/tmp ] ; then mkdir hard-disk/tmp; fi
2 cp -a /tmp/* hard-disk/tmp
3 mount --bind hard-disk/tmp /tmp
4 export TMPDIR=/tmp
In stage 1, you could also have an else statement that cleans out old
files.
--
================================================== ======
Please always reply to ng as the email in this post's
header does not exist. Or use a contact address at:
http://www.macfh.co.uk/JavaJive/JavaJive.html
http://www.macfh.co.uk/Macfarlane/Macfarlane.html