diff options
author | Ondřej Lysoněk <olysonek@redhat.com> | 2019-10-17 15:14:16 +0200 |
---|---|---|
committer | Ondřej Lysoněk <olysonek@redhat.com> | 2019-10-17 15:29:58 +0200 |
commit | 5c900c7e851cc1f0de81772432e37a54e9833f89 (patch) | |
tree | a3a64a04c2a415450b114fb5002a1223490f1a3d /prog | |
parent | c28d20d19d620f42d239ed4b35139683035f11dc (diff) | |
download | lm-sensors-git-5c900c7e851cc1f0de81772432e37a54e9833f89.tar.gz |
Replace svn keywords with LM_SENSORS_VER constant
The keywords Revision, Date and Id were being expanded by Subversion
way back when the project was being maintained in Subversion. Now when
the project is maintained in git, the keywords are no longer expanded
and appear e.g. in the output of sensors-detect literally.
Drop the keywords, or replace them with LM_SENSORS_VER where
applicable.
The value of the constant will have to be updated manually every time
a new release is made.
Inspired by a similar change in i2c-tools (commit daa430031ffd;
thanks, Jean).
Diffstat (limited to 'prog')
-rwxr-xr-x | prog/detect/sensors-detect | 9 | ||||
-rwxr-xr-x | prog/init/fancontrol.init | 2 | ||||
-rwxr-xr-x | prog/pwm/pwmconfig | 5 |
3 files changed, 5 insertions, 11 deletions
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 78b0b5a1..bde31940 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -38,12 +38,9 @@ foreach ('/usr/sbin', '/usr/local/sbin', '/sbin') { ######################### use constant NO_CACHE => 1; +use constant LM_SENSORS_VER => '3.5.0'; use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids - $i2c_addresses_to_scan $revision @i2c_byte_cache %opt); - -$revision = '$Revision$ ($Date$)'; -$revision =~ s/\$\w+: (.*?) \$/$1/g; -$revision =~ s/ \([^()]*\)//; + $i2c_addresses_to_scan @i2c_byte_cache %opt); # This is the list of SMBus or I2C adapters we recognize by their PCI # signature. This is an easy and fast way to determine which SMBus or I2C @@ -7511,7 +7508,7 @@ sub main system("/sbin/service", "lm_sensors", "stop"); } - print "# sensors-detect revision $revision\n"; + print "# sensors-detect version ".LM_SENSORS_VER."\n"; initialize_dmi_data(); print_dmi_summary(); print_kernel_version(); diff --git a/prog/init/fancontrol.init b/prog/init/fancontrol.init index eabe734c..8ab2c929 100755 --- a/prog/init/fancontrol.init +++ b/prog/init/fancontrol.init @@ -1,7 +1,5 @@ #!/bin/sh # -# $Id$ -# # fancontrol # # chkconfig: 2345 90 01 diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index a40acd5c..68ac6f79 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -29,8 +29,7 @@ # # -REVISION=$(echo '$Revision$' | cut -d' ' -f2) -REVDATE=$(echo '$Date$' | cut -d' ' -f2) +LM_SENSORS_VER='3.5.0' PIDFILE="/var/run/fancontrol.pid" if [ -f "$PIDFILE" ] @@ -48,7 +47,7 @@ then exit 1 fi -echo "# pwmconfig revision $REVISION ($REVDATE)" +echo "# pwmconfig version $LM_SENSORS_VER" echo 'This program will search your sensors for pulse width modulation (pwm)' echo 'controls, and test each one to see if it controls a fan on' echo 'your motherboard. Note that many motherboards do not have pwm' |