fix handling of alternate config file name

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2930 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2005-03-15 19:24:25 +00:00
1 parent 6312bfab53
commit 57782cede2
1 file changed
+2 -2
+2 -2
View File
@@ -465,9 +465,9 @@ function TestMinStop {
function SaveConfig {
echo
echo "Saving configuration to $FCCONFIG..."
egrep -v '(INTERVAL|FCTEMPS|FCFANS|MAXTEMP|MINTEMP|MINSTART|MINSTOP)' /etc/fancontrol >/tmp/fancontrol
egrep -v '(INTERVAL|FCTEMPS|FCFANS|MAXTEMP|MINTEMP|MINSTART|MINSTOP)' $FCCONFIG >/tmp/fancontrol
echo -e "INTERVAL=$INTERVAL\nFCTEMPS=$FCTEMPS\nFCFANS=$FCFANS\nMINTEMP=$MINTEMP\nMAXTEMP=$MAXTEMP\nMINSTART=$MINSTART\nMINSTOP=$MINSTOP" >>/tmp/fancontrol
mv /tmp/fancontrol /etc/fancontrol
mv /tmp/fancontrol $FCCONFIG
#check if file was written correctly
echo 'Configuration saved'
}