2
etc/sensors-conf-convert | 17 ++++++++++++++++-
3
1 file changed, 16 insertions(+), 1 deletion(-)
5
--- a/etc/sensors-conf-convert
6
+++ b/etc/sensors-conf-convert
8
# the user doesn't have a bad surprise when uncommenting them.
11
-use vars qw($debug $chip %trans @delete %chip_trans %chip_delete);
12
+use vars qw($debug $chip %trans @delete %chip_trans %chip_delete $first_part $second_part $compute_next);
17
$_ = substitute_line($chip, $_);
21
+# Formula changes (in0 -> in0_input)
22
+if (m/^([\s#]*compute\s+\S+)(.*)/) {
25
+ $second_part =~ s/in(\d+)/in$1_input/gi;
26
+ $_ = "$first_part$second_part\n";
27
+ $compute_next = 1 if (m/\\$/);
28
+} elsif ($compute_next) {
29
+ s/in(\d+)/in$1_input/gi;
30
+ $compute_next = 0 if (! m/\\$/);