mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-01 14:55:27 +00:00
Fix sensors-detect so that it works on old Perl versions again
Tested on versions 5.005_003 and 5.6.1 git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1587 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -28,7 +28,8 @@
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
use Fcntl qw(:seek);
|
||||
use Fcntl;
|
||||
use POSIX;
|
||||
|
||||
#########################
|
||||
# CONSTANT DECLARATIONS #
|
||||
@@ -2854,7 +2855,7 @@ sub system_safeness_by_dmi
|
||||
" Runing dmidecode would help us determining your system vendor, which allows\n",
|
||||
" safer operations. Please provide one of the following:\n ";
|
||||
print join ("\n ", @dmidecode);
|
||||
print "\nYou can still go on, but you are encouraged to fix the problem first.\n";
|
||||
print "\n You can still go on, but you are encouraged to fix the problem first.\n\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3221,7 +3222,7 @@ sub main
|
||||
} else {
|
||||
if (($have_sysconfig and not <STDIN> =~ /^\s*[Nn]/) or <STDIN> =~ /^\s*[Yy]/) {
|
||||
unless ($have_sysconfig) {
|
||||
mkdir '/etc/sysconfig'
|
||||
mkdir '/etc/sysconfig', 0777
|
||||
or die "Sorry, can't create /etc/sysconfig ($!)?!?";
|
||||
}
|
||||
open(SYSCONFIG, ">/etc/sysconfig/lm_sensors")
|
||||
|
Reference in New Issue
Block a user