diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-02 07:15:49 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-02 07:16:49 +0000 |
commit | 63be3a8df3941a31abb253ed47bf44c612863b13 (patch) | |
tree | 236c10bb759cb9c46c4f58256b22b268a3adfe14 /main/lm_sensors/sensors-detect-alpine.patch | |
parent | df9234e0a16f34faaa4b0753409216006dfe1a18 (diff) | |
download | aports-63be3a8df3941a31abb253ed47bf44c612863b13.tar.bz2 aports-63be3a8df3941a31abb253ed47bf44c612863b13.tar.xz |
main/lm_sensors: upgrade to 3.3.5
Diffstat (limited to 'main/lm_sensors/sensors-detect-alpine.patch')
-rw-r--r-- | main/lm_sensors/sensors-detect-alpine.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/lm_sensors/sensors-detect-alpine.patch b/main/lm_sensors/sensors-detect-alpine.patch new file mode 100644 index 0000000000..1d5b2b2eb1 --- /dev/null +++ b/main/lm_sensors/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'); + $_ = read_answer(); +- 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. |