1 | # Copyright 1999-2013 Gentoo Foundation |
1 | # Copyright 1999-2014 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.115 2013/12/01 19:11:24 robbat2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.116 2014/01/14 20:50:23 mpagano Exp $ |
4 | |
4 | |
5 | # @ECLASS: linux-mod.eclass |
5 | # @ECLASS: linux-mod.eclass |
6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
7 | # kernel-misc@gentoo.org |
7 | # kernel-misc@gentoo.org |
8 | # @AUTHOR: |
8 | # @AUTHOR: |
… | |
… | |
429 | myIFS="${IFS}" |
429 | myIFS="${IFS}" |
430 | IFS="$(echo -en "\n\b")" |
430 | IFS="$(echo -en "\n\b")" |
431 | |
431 | |
432 | for t in ${module_modinfo} |
432 | for t in ${module_modinfo} |
433 | do |
433 | do |
434 | myVAR="$(echo ${t#*:} | grep -e " [0-9][ =]" | sed "s:.*\([01][= ]\).*:\1:")" |
434 | myVAR="$(echo ${t#*:} | grep -o "[^ ]*[0-9][ =][^ ]*" | tail -1 | grep -o "[0-9]")" |
435 | if [[ -n ${myVAR} ]] |
435 | if [[ -n ${myVAR} ]] |
436 | then |
436 | then |
437 | module_opts="${module_opts} ${t%%:*}:${myVAR}" |
437 | module_opts="${module_opts} ${t%%:*}:${myVAR}" |
438 | fi |
438 | fi |
439 | echo -e "# ${t%%:*}:\t${t#*:}" >> "${module_config}" |
439 | echo -e "# ${t%%:*}:\t${t#*:}" >> "${module_config}" |