mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
Include a sample conversion script to address the configuration file
format change (#2246). git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5621 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -62,6 +62,7 @@ SVN-HEAD
|
||||
Fix detection of older DS1621
|
||||
Add nNidia nForce MCP67, MCP73, MCP79 SMBus support
|
||||
sensors-detect-stat.pl: Delete (functionality merged into sensors-detect)
|
||||
sysconfig-lm_sensors-convert: Sample config file conversion script (#2246)
|
||||
|
||||
3.0.3 (2008-09-28)
|
||||
libsensors: Avoid namespace pollution
|
||||
|
30
prog/init/sysconfig-lm_sensors-convert
Executable file
30
prog/init/sysconfig-lm_sensors-convert
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Convert an lm_sensors service configuration file from the old convention
|
||||
# (MODULE_0, MODULE_1...) to the new convention (HWMON_MODULES).
|
||||
#
|
||||
# Copyright (C) 2009 Jean Delvare <khali@linux-fr.org>
|
||||
#
|
||||
# Released without a license on purpose. This is public domain code, so
|
||||
# that package maintainers can include it in their post-install script.
|
||||
|
||||
CONFIG=/etc/sysconfig/lm_sensors
|
||||
test -r "$CONFIG" || exit
|
||||
|
||||
unset ${!MODULE_*} $HWMON_MODULES
|
||||
. "$CONFIG"
|
||||
test -n "$HWMON_MODULES" && exit
|
||||
|
||||
for i in ${!MODULE_*} ; do
|
||||
eval module=\$$i
|
||||
if test -z "$HWMON_MODULES" ; then
|
||||
HWMON_MODULES="$module"
|
||||
else
|
||||
HWMON_MODULES="$HWMON_MODULES $module"
|
||||
fi
|
||||
done
|
||||
test -z "$HWMON_MODULES" && exit
|
||||
|
||||
echo >> "$CONFIG"
|
||||
echo "# New configuration format generated by sysconfig-lm_sensors-convert" >> "$CONFIG"
|
||||
echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG"
|
Reference in New Issue
Block a user