Use mktemp instead of tempfile to create the temporary config file.

We are already using mktemp elsewhere in the script, and it seems to be
more widely available than tempfile.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4153 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-09-07 15:56:11 +00:00
1 parent c0c8286b34
commit 5ff0a6b0e7
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ lm_sensors CHANGES file
Program i2cdump: Restore bank after bank switching
Add new mode W (read word on even register addresses)
Program mkpatch: Fix typo breaking f71805f
Program pwmconfig: Use mktemp instead of tempfile
Program sensors: No error messages on missing w83792d fan4-7 (Yuan Mu)
Add smsc47m192 support
Add abituguru support (Hans de Goede)
+1 -1
View File
@@ -465,7 +465,7 @@ function TestMinStop {
function SaveConfig {
echo
echo "Saving configuration to $FCCONFIG..."
tmpfile=`tempfile` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
tmpfile=`mktemp -t pwmcfg.XXXXXXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
egrep -v '(INTERVAL|FCTEMPS|FCFANS|MAXTEMP|MINTEMP|MINSTART|MINSTOP)' $FCCONFIG >$tmpfile
echo -e "INTERVAL=$INTERVAL\nFCTEMPS=$FCTEMPS\nFCFANS=$FCFANS\nMINTEMP=$MINTEMP\nMAXTEMP=$MAXTEMP\nMINSTART=$MINSTART\nMINSTOP=$MINSTOP" >>$tmpfile