Skip to contentSkip to conversation

also recognise /etc/modprobe.conf (Fedora patch)

lm-sensors Jean Delvare 2 participants 4 messages Jul 7, 2007

lore
Share & tools
lore
#0 lore raw
Quoted 14 lines
      Author: jwrdegoede
        Date: Fri Jul  6 21:13:50 2007

New Revision: 4566
Changeset: http://lm-sensors.org/changeset/4566

Modified:
lm-sensors/trunk/prog/detect/sensors-detect

Log:
also recognise /etc/modprobe.conf (Fedora patch)

lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) line 2175

Quoted 8 lines
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) renamed from lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4562) +2 -0
@@ -2168,6 +2168,8 @@
     $modules_conf = '/etc/modules.conf';
   } elsif (-f '/etc/conf.modules') {
     $modules_conf = '/etc/conf.modules';
+  } elsif (-f '/etc/modprobe.conf') {
+    $modules_conf = '/etc/modprobe.conf';
   } else { # default
     $modules_conf = '/etc/modules.conf';
   }

Very good. We should have done this a long time ago, I think that all the distributions out there were patching sensors-detect that way.

I would go even further:

* We can probably drop support for /etc/conf.modules entirely?

* If both /etc/modprobe.conf and /etc/modules.conf are present, it is likely that /etc/modprobe.conf should be used, so I we should test it first.

* If neither file is found, the default could depend on the kernel version. Defaulting to /etc/modules.conf for a 2.6 kernel-based system is rather unlikely to be correct.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 30 lines · Jean Delvare
Quoted 14 lines
      Author: jwrdegoede
        Date: Fri Jul  6 21:13:50 2007

New Revision: 4566
Changeset: http://lm-sensors.org/changeset/4566

Modified:
lm-sensors/trunk/prog/detect/sensors-detect

Log:
also recognise /etc/modprobe.conf (Fedora patch)

lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) line 2175

Quoted 8 lines
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) renamed from lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4562) +2 -0
@@ -2168,6 +2168,8 @@
     $modules_conf = '/etc/modules.conf';
   } elsif (-f '/etc/conf.modules') {
     $modules_conf = '/etc/conf.modules';
+  } elsif (-f '/etc/modprobe.conf') {
+    $modules_conf = '/etc/modprobe.conf';
   } else { # default
     $modules_conf = '/etc/modules.conf';
   }

Very good. We should have done this a long time ago, I think that all the distributions out there were patching sensors-detect that way.

I would go even further:

* We can probably drop support for /etc/conf.modules entirely?

Quoted 8 lines

* If both /etc/modprobe.conf and /etc/modules.conf are present, it is likely that /etc/modprobe.conf should be used, so I we should test it first.

* If neither file is found, the default could depend on the kernel version. Defaulting to /etc/modules.conf for a 2.6 kernel-based system is rather unlikely to be correct.

I fully agree, with all of the above. My perl-foo is not all that good, so the last bullet / point (default depending on kernel version) is probably best handled by someone else. I can implement the other 2 points if you want, but those are so trivial that when someone does 3 he can easily do them too, eitherway let me know.

Regards,

Hans

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Jean Delvare
Quoted 28 lines · Hans de Goede
Quoted 19 lines · Jean Delvare

lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) line 2175

Quoted 11 lines
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4567) renamed from lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect (revision 4562) +2 -0
@@ -2168,6 +2168,8 @@
     $modules_conf = '/etc/modules.conf';
   } elsif (-f '/etc/conf.modules') {
     $modules_conf = '/etc/conf.modules';
+  } elsif (-f '/etc/modprobe.conf') {
+    $modules_conf = '/etc/modprobe.conf';
   } else { # default
     $modules_conf = '/etc/modules.conf';
   }

Very good. We should have done this a long time ago, I think that all the distributions out there were patching sensors-detect that way.

I would go even further:

* We can probably drop support for /etc/conf.modules entirely?

Quoted 7 lines

* If both /etc/modprobe.conf and /etc/modules.conf are present, it is likely that /etc/modprobe.conf should be used, so I we should test it first.

* If neither file is found, the default could depend on the kernel version. Defaulting to /etc/modules.conf for a 2.6 kernel-based system is rather unlikely to be correct.

Quoted 5 lines

I fully agree, with all of the above. My perl-foo is not all that good, so the last bullet / point (default depending on kernel version) is probably best handled by someone else. I can implement the other 2 points if you want, but those are so trivial that when someone does 3 he can easily do them too, eitherway let me know.

I can take care of it. But my initial plan is not correct. My Slackware system has both /etc/modprobe.conf and /etc/modules.conf... because it can run with either a 2.4 or a 2.6 kernel, and I actually use both (it's my test system). In fact, which config file you should edit merely depends on the kernel version you're running.

So I think I'll go with a more straightforward strategy: if kernel >2.6.0, use /etc/modprobe.conf, otherwise use /etc/modules.conf. OK?

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw
In reply to Jean Delvare
Quoted 7 lines · Jean Delvare
Quoted 5 lines · Hans de Goede

I fully agree, with all of the above. My perl-foo is not all that good, so the last bullet / point (default depending on kernel version) is probably best handled by someone else. I can implement the other 2 points if you want, but those are so trivial that when someone does 3 he can easily do them too, eitherway let me know.

Quoted 8 lines

I can take care of it. But my initial plan is not correct. My Slackware system has both /etc/modprobe.conf and /etc/modules.conf... because it can run with either a 2.4 or a 2.6 kernel, and I actually use both (it's my test system). In fact, which config file you should edit merely depends on the kernel version you're running.

So I think I'll go with a more straightforward strategy: if kernel >> 2.6.0, use /etc/modprobe.conf, otherwise use /etc/modules.conf. OK?

Sounds fine to me.

Regards,

Hans

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors