/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 109 Revision 110
1#!/sbin/runscript 1#!/sbin/runscript
2# Copyright 1999-2005 Gentoo Foundation 2# Copyright 1999-2005 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License v2 3# Distributed under the terms of the GNU General Public License v2
4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.61 2006/06/21 15:29:04 wolf31o2 Exp $ 4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.62 2006/06/23 21:01:30 wolf31o2 Exp $
5 5
6DHCP="yes" 6DHCP="yes"
7DETECT="yes" 7DETECT="yes"
8GPM="yes" 8GPM="yes"
9PCMCIA="no" 9PCMCIA="no"
113get_info() { 113get_info() {
114 local tmp 114 local tmp
115 115
116 if [ ! -z "${1}" -a ! -z "${2}" ] 116 if [ ! -z "${1}" -a ! -z "${2}" ]
117 then 117 then
118 tmp=$(grep "^$1[[:space:]]\+:" /proc/cpuinfo | head -n 1 | cut -d" " -f3-) 118# tmp=$(grep "^$1[[:space:]]\+:" /proc/cpuinfo | head -n 1 | cut -d" " -f3-)
119 tmp=$([[ $'\n'$(</proc/cpuinfo) =~ $'\n''$1[[:space:]]\+:' ]] | head -n 1 | cut -d" " -f3-)
119 eval "$2='${tmp}'" 120 eval "$2='${tmp}'"
120 fi 121 fi
121} 122}
122 123
123detect_mips() { 124detect_mips() {
220 echo "0" > /proc/sys/kernel/printk 221 echo "0" > /proc/sys/kernel/printk
221 get_config 222 get_config
222 if [ "${DETECT}" = "yes" ] 223 if [ "${DETECT}" = "yes" ]
223 then 224 then
224 ebegin "Hardware detection started" 225 ebegin "Hardware detection started"
225 local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)" 226# local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)"
227 local numcpu=$([[ $'\n'$(</proc/cpuinfo) =~ $'\n''processor[[:space:]]\+:' ]] | wc -l)
226 local arch="$(uname -m)" 228 local arch="$(uname -m)"
227 229
228 case ${arch} in 230 case ${arch} in
229 mips*) 231 mips*)
230 detect_mips 232 detect_mips
317 then 319 then
318 einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..." 320 einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
319 source /etc/sysconfig/mouse 321 source /etc/sysconfig/mouse
320 if [ -x /usr/sbin/gpm ] 322 if [ -x /usr/sbin/gpm ]
321 then 323 then
322 [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ] \ 324# if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]
325 if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSE=${MOUSETYPE}' ]]) ]
326 then
323 && sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm \ 327 sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
328 else
324 || echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm 329 echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
330 fi
325 331
326 [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ] \ 332# if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]
333 if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSEDEV=${DEVICE}' ]]) ]
334 then
327 && sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm \ 335 sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
336 else
328 || echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm 337 echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
338 fi
329 339
330 [ "${GPM}" = "yes" ] \ 340 [ "${GPM}" = "yes" ] \
331 && [ -x /etc/init.d/gpm ] && start_service gpm 341 && [ -x /etc/init.d/gpm ] && start_service gpm
332 fi 342 fi
333 fi 343 fi

Legend:
Removed from v.109  
changed lines
  Added in v.110

  ViewVC Help
Powered by ViewVC 1.1.20