Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
View | Details | Raw Unified | Return to bug 480018 | Differences between
and this patch

Collapse All | Expand All

(-)old/lm_sensors-3-init.d (-34 / +15 lines)
Lines 10-17 Link Here
10
	fi
10
	fi
11
11
12
	if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
12
	if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
13
		if [ -z "${MODULE_0}" ]; then
13
		if [ -z "${HWMON_MODULES}" ]; then
14
			eerror "MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
14
			eerror "HWMON_MODULES is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
15
			return 1
15
			return 1
16
		fi
16
		fi
17
	fi
17
	fi
Lines 45-63 Link Here
45
			[ -e /proc/sys/dev/sensors ] || return 1
45
			[ -e /proc/sys/dev/sensors ] || return 1
46
			eend 0
46
			eend 0
47
		fi
47
		fi
48
48
      
49
		i=0
49
      for module in ${HWMON_MODULES}; do
50
		while true; do
50
         ebegin "  Loading ${module}"
51
			module=`eval echo '$'MODULE_${i}`
51
         modprobe ${module} >/dev/null 2>&1
52
			module_args=`eval echo '$'MODULE_${i}_ARGS`
52
         eend $?
53
			if [ -z "${module}" ]; then
53
      done
54
				break
55
			fi
56
			ebegin "  Loading ${module}"
57
			modprobe ${module} ${module_args} >/dev/null 2>&1
58
			eend $?
59
			i=$(($i+1))
60
		done
61
	fi
54
	fi
62
55
63
	if [ "${INITSENSORS}" = "yes" ]; then
56
	if [ "${INITSENSORS}" = "yes" ]; then
Lines 77-101 Link Here
77
70
78
	if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
71
	if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
79
		einfo "Unloading lm_sensors modules..."
72
		einfo "Unloading lm_sensors modules..."
80
73
      
81
		# find the highest possible MODULE_ number
74
      for module in ${HWMON_MODULES}; do
82
		i=0
75
         ebegin "  Unloading ${module}"
83
		while true; do
76
         rmmod ${module} >/dev/null 2>&1
84
			module=`eval echo '$'MODULE_${i}`
77
         eend $?
85
			if [ -z "${module}" ] ; then
78
      done
86
				break
79
      
87
			fi
88
			i=$(($i+1))
89
		done
90
91
		while [ ${i} -gt 0 ]; do
92
			i=$(($i-1))
93
			module=`eval echo '$'MODULE_${i}`
94
			ebegin "  Unloading ${module}"
95
			rmmod ${module} >/dev/null 2>&1
96
			eend $?
97
		done
98
99
		if [ -e /proc/sys/dev/sensors ] ; then
80
		if [ -e /proc/sys/dev/sensors ] ; then
100
			ebegin "  Unloading i2c-proc"
81
			ebegin "  Unloading i2c-proc"
101
			rmmod i2c-proc >/dev/null 2>&1
82
			rmmod i2c-proc >/dev/null 2>&1

Return to bug 480018