diff options
author | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2009-07-24 13:52:28 +0000 |
---|---|---|
committer | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2009-07-24 13:52:28 +0000 |
commit | d33dc8a71f80b9c4475df80b0782ee257d438522 (patch) | |
tree | ba582dbab2fa66fba9a6715fe716d5b09ddf2fbd | |
parent | 14fe9c724ee50273fc1bd794f8992b929dffb34b (diff) | |
download | lm-sensors-d33dc8a71f80b9c4475df80b0782ee257d438522.tar.gz |
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
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | etc/Module.mk | 4 | ||||
-rwxr-xr-x | prog/detect/sensors-detect | 8 |
3 files changed, 9 insertions, 4 deletions
@@ -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); |