Debian Codegraph @

hooks/thermal

raw
1 #!/bin/sh
2
3 PREREQ=""
4
5 prereqs()
6 {
7 echo "$PREREQ"
8 }
9
10 case $1 in
11 # get pre-requisites
12 prereqs)
13 prereqs
14 exit 0
15 ;;
16 esac
17
18 # Hooks for loading thermal bits into the initramfs
19
20 . /usr/share/initramfs-tools/hook-functions
21
22 case "$DPKG_ARCH" in
23 # copy the right modules
24 powerpc|ppc64)
25
26 # Only G5 Mac machines need to load
27 # windfarm_core or one of the windfarm_pm* modules.
28
29 [ -r /proc/cpuinfo ] || exit 0
30
31 MODEL="$(grep model /proc/cpuinfo)"
32 MODEL="${MODEL##*: }"
33
34 case "$MODEL" in
35 RackMac3,1)
36 force_load windfarm_rm31
37 ;;
38 PowerMac7,2|PowerMac7,3)
39 force_load windfarm_pm72
40 ;;
41 PowerMac8,1|PowerMac8,2)
42 force_load windfarm_pm81
43 ;;
44 PowerMac9,1)
45 force_load windfarm_pm91
46 ;;
47 PowerMac11,2)
48 force_load windfarm_pm112
49 ;;
50 PowerMac12,1)
51 force_load windfarm_pm121
52 ;;
53 *)
54 # No other machine needs windfarm_* modules on initrd.
55 exit 0
56 ;;
57 esac
58 manual_add_modules windfarm_core windfarm_cpufreq_clamp \
59 windfarm_lm75_sensor windfarm_max6690_sensor windfarm_pid \
60 windfarm_smu_controls windfarm_smu_sat windfarm_smu_sensors
61 ;;
62 i386|amd64|ia64)
63 manual_add_modules fan thermal
64 ;;
65 esac