2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

Recent versions of module-init-tools only want *.conf files under

/etc/modprobe.d. So rename our configuration file to lm_sensors.conf
there. Also let "make install" rename the file if it already exists.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5760 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2009-07-24 13:52:28 +00:00
parent 4d3ee85bae
commit 1bb3175a5f
3 changed files with 9 additions and 4 deletions

View File

@@ -5472,8 +5472,8 @@ sub write_config
if (defined $configfile) {
my $have_modprobe_d = -d '/etc/modprobe.d';
printf "Do you want to \%s /etc/modprobe.d/lm_sensors? (\%s): ",
(-e '/etc/modprobe.d/lm_sensors' ? 'overwrite' : 'generate'),
printf "Do you want to \%s /etc/modprobe.d/lm_sensors.conf? (\%s): ",
(-e '/etc/modprobe.d/lm_sensors.conf' ? 'overwrite' : 'generate'),
($have_modprobe_d ? 'YES/no' : 'yes/NO');
$_ = <STDIN>;
if (($have_modprobe_d and not m/^\s*n/i) or m/^\s*y/i) {
@@ -5481,8 +5481,8 @@ sub write_config
mkdir('/etc/modprobe.d', 0777)
or die "Sorry, can't create /etc/modprobe.d ($!)";
}
open(local *MODPROBE_D, ">/etc/modprobe.d/lm_sensors")
or die "Sorry, can't create /etc/modprobe.d/lm_sensors ($!)";
open(local *MODPROBE_D, ">/etc/modprobe.d/lm_sensors.conf")
or die "Sorry, can't create /etc/modprobe.d/lm_sensors.conf ($!)";
print MODPROBE_D "# Generated by sensors-detect on " . scalar localtime() . "\n";
print MODPROBE_D $configfile;
close(MODPROBE_D);