From 5ff0a6b0e74951565602981f5ee60394274c5546 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 7 Sep 2006 15:56:11 +0000 Subject: [PATCH] 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 --- CHANGES | 1 + prog/pwm/pwmconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d30121c1..f2a80ef0 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index 5cf3f046..4a0cfd0a 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -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