summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--etc/Module.mk4
-rwxr-xr-xprog/detect/sensors-detect8
3 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3c7d421d..ddd238cf 100644
--- a/Makefile
+++ b/Makefile
@@ -118,6 +118,7 @@ SRCDIRS += lib/test
MKDIR := mkdir -p
RMDIR := rmdir
RM := rm -f
+MV := mv -f
BISON := bison
FLEX := flex
AR := ar
diff --git a/etc/Module.mk b/etc/Module.mk
index 7187dcd9..2bdd634a 100644
--- a/etc/Module.mk
+++ b/etc/Module.mk
@@ -28,6 +28,10 @@ install-etc:
fi
$(MKDIR) $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 $(ETC_DIR)/sensors-conf-convert $(DESTDIR)$(BINDIR)
+ if [ -e $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors \
+ -a ! -e $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ] ; then \
+ $(MV) $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ; \
+ fi
user_install :: install-etc
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
index bbab62c1..9c907ee2 100755
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -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);