summaryrefslogtreecommitdiffstats
path: root/main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch')
-rw-r--r--main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch b/main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch
new file mode 100644
index 00000000000..9271c6bac2a
--- /dev/null
+++ b/main/lm_sensors/lm_sensors-3.1.0-sensors-detect-alpine.patch
@@ -0,0 +1,39 @@
+diff -ru lm_sensors-3.1.0.orig/prog/detect/sensors-detect lm_sensors-3.1.0/prog/detect/sensors-detect
+--- lm_sensors-3.1.0.orig/prog/detect/sensors-detect 2009-04-14 07:14:22.000000000 +0000
++++ lm_sensors-3.1.0/prog/detect/sensors-detect 2009-04-14 07:44:48.000000000 +0000
+@@ -5282,19 +5282,24 @@
+ }
+ }
+
+- my $have_sysconfig = -d '/etc/sysconfig';
+- printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ",
+- (-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'),
+- ($have_sysconfig ? 'YES/no' : 'yes/NO');
++ my $config = '/etc/conf.d/lm_sensors';
++ my $have_config = -f $config;
++ printf "Do you want to \%s \%s? (\%s): ",
++ (-e $config ? 'overwrite' : 'generate'),
++ $config,
++ ($have_config ? 'YES/no' : 'yes/NO');
+ $_ = <STDIN>;
+- if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
+- unless ($have_sysconfig) {
+- mkdir('/etc/sysconfig', 0777)
+- or die "Sorry, can't create /etc/sysconfig ($!)";
+- }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++ if (($have_config and not m/^\s*n/i) or m/^\s*y/i) {
++ open(local *SYSCONFIG, ">$config")
++ or die "Sorry, can't create $config ($!)";
+ print SYSCONFIG "# Generated by sensors-detect on " . scalar localtime() . "\n";
++ print SYSCONFIG
++ "\n".
++ "# Load modules at startup\n".
++ "LOADMODULES=yes\n\n".
++ "# Initialize sensors at startup\n".
++ "INITSENSORS=yes\n\n";
++
+ print SYSCONFIG <<'EOT';
+ # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
+ # be loaded/unloaded.