diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-07-24 16:06:33 +0000 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-07-24 16:06:33 +0000 |
commit | add5b75f35898a5771338cfb8bd2d789f936fd00 (patch) | |
tree | 7d7a8399fd1d2bca1667d525a96ff407706afa53 | |
parent | 368688fc559f44d4f621cb282996331097f7ac72 (diff) | |
download | lm-sensors-git-add5b75f35898a5771338cfb8bd2d789f936fd00.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/branches/lm-sensors-2.10@5762 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | etc/Module.mk | 4 | ||||
-rwxr-xr-x | prog/detect/sensors-detect | 8 |
4 files changed, 10 insertions, 4 deletions
@@ -11,6 +11,7 @@ SVN-HEAD Program sensord: Fix a memory leak when a chip name is provided Program sensors: Fix a memory leak when a chip name is provided Program sensors-detect: Fix detection of older DS1621 + Rename the modprobe config file to lm_sensors.conf 2.10.8 (20081216) File doc/chips/lm90: Update datasheet links (2.6 backport) @@ -193,6 +193,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 389c30b4..142452da 100644 --- a/etc/Module.mk +++ b/etc/Module.mk @@ -31,6 +31,10 @@ install-etc: if [ ! -e $(DESTDIR)$(ETCINSTALL) ] ; then \ $(INSTALL) -m 644 $(ETCTARGET) $(DESTDIR)$(ETCINSTALL); \ fi + 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 # No clean rule diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 65767889..91de9f59 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -5942,8 +5942,8 @@ sub main 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) { @@ -5951,8 +5951,8 @@ sub main 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; |