mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Exit if configuration file can't be read.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5667 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
144191432b
commit
45446011ec
2 files changed
+7
No files matched your search
@@ -24,6 +24,7 @@ SVN-HEAD
|
||||
pwmconfig: Drop support for kernels 2.4 and earlier
|
||||
fancontrol: Don't round temperature values
|
||||
Drop support for kernels 2.4 and earlier
|
||||
Exit if configuration file can't be read
|
||||
maxilife scripts: Delete (driver never ported to Linux 2.6)
|
||||
sensord: Accept negative temperatures in RRD database
|
||||
Don't bail out on transient errors (#2330)
|
||||
|
||||
@@ -54,6 +54,12 @@ declare -i pwmval
|
||||
|
||||
function LoadConfig {
|
||||
echo "Loading configuration from $1 ..."
|
||||
if [ ! -r "$1" ]
|
||||
then
|
||||
echo "Error: Can't read configuration file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grep configuration from file
|
||||
INTERVAL=`egrep '^INTERVAL=.*$' $1 | sed -e 's/INTERVAL=//g'`
|
||||
FCTEMPS=`egrep '^FCTEMPS=.*$' $1 | sed -e 's/FCTEMPS=//g'`
|
||||
|
||||
Reference in new issue
Block a user