Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 448334 | Differences between
and this patch

Collapse All | Expand All

(-)a/etc/init.d/hdparm (-1 / +17 lines)
Lines 43-53 Link Here
43
		case ${errmsg} in
43
		case ${errmsg} in
44
		    *": No medium found") nomed=0;;
44
		    *": No medium found") nomed=0;;
45
		esac
45
		esac
46
		args=""
46
		if [ -b "${device}" ] && [ "${status}" = "0" -o "${nomed}" = "0" ] ; then
47
		if [ -b "${device}" ] && [ "${status}" = "0" -o "${nomed}" = "0" ] ; then
47
			local conf_var="${device##*/}_args"
48
			local conf_var="${device##*/}_args"
48
			eval args=\$${conf_var}
49
			eval args=\$${conf_var}
49
			do_hdparm
50
		fi
50
		fi
51
52
		# allows a disk to be configured using its id (override above)
53
		# we replace all dashes by underscores
54
		for alias in /dev/disk/by-id/* ; do
55
			if [ "${alias}" -ef "${device}" ] ; then
56
				eval args_tmp=\$"$(basename "${alias}" | sed 's/-/_/g')"_args
57
				if [ -n "${args_tmp}" ]; then
58
					args="${args_tmp}"
59
				fi
60
				break
61
			fi
62
		done
63
64
		if [ -n "$args" ]; then
65
			do_hdparm
66
		fi;
51
	done
67
	done
52
}
68
}
53
69

Return to bug 448334