/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 97 Revision 98
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.56 2006/02/10 15:36:48 wolf31o2 Exp $ 4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.57 2006/04/23 17:06:38 wolf31o2 Exp $
5 5
6DHCP="yes" 6DHCP="yes"
7DETECT="yes" 7DETECT="yes"
8GPM="yes" 8GPM="yes"
9PCMCIA="no" 9PCMCIA="no"
144 local mhz="$(awk -F: '/^cpu MHz/{printf " %dMHz",int($2)};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)" 144 local mhz="$(awk -F: '/^cpu MHz/{printf " %dMHz",int($2)};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)"
145 145
146 PC="Detected ${numcpu} ${cpuinfo} ${mhz} ${bit}" 146 PC="Detected ${numcpu} ${cpuinfo} ${mhz} ${bit}"
147} 147}
148 148
149detect_alpha() {
150 local cpuinfo="$(awk -F: '/^platform string/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)"
151 local numcpu="$(awk -F: '/^cpus active/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)"
152 if [ "${numcpu}" -gt '1' ]
153 then
154 bit="CPUs"
155 else
156 bit="CPU"
157 fi
158 PC="Detected ${numcpu} ${cpuinfo} ${bit}"
159}
160
149detect_ppc() { 161detect_ppc() {
150 local cpuinfo="$(awk -F: '/^cpu/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)" 162 local cpuinfo="$(awk -F: '/^cpu/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)"
151 local mhz="$(awk -F: '/^clock/{printf " %dMHz",int($2)};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)" 163 local mhz="$(awk -F: '/^clock/{printf " %dMHz",int($2)};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | head -n 1)"
152 local machinfo="$(awk -F: '/^detected as/{printf $2}' /proc/cpuinfo | cut -d'(' -f2 | cut -d')' -f1)" 164 local machinfo="$(awk -F: '/^detected as/{printf $2}' /proc/cpuinfo | cut -d'(' -f2 | cut -d')' -f1)"
153 local machtype="" 165 local machtype=""
199 then 211 then
200 ebegin "Hardware detection started" 212 ebegin "Hardware detection started"
201 local numcpu="$(awk -F: '/^processor/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | wc -l)" 213 local numcpu="$(awk -F: '/^processor/{printf $2};/^$/{print ""}' /proc/cpuinfo 2>/dev/null | wc -l)"
202 local arch="$(uname -m)" 214 local arch="$(uname -m)"
203 local ismips="no" 215 local ismips="no"
204 [ "${numcpu}" -gt '1' ] && bit="CPUs" || bit="CPU" 216 if [ "${numcpu}" -gt '1' ]
217 then
218 bit="CPUs"
219 else
220 bit="CPU"
221 fi
205 case ${arch} in 222 case ${arch} in
206 mips|mips64) 223 mips|mips64)
207 detect_mips 224 detect_mips
208 ismips="yes" 225 ismips="yes"
209 ;; 226 ;;
210 i?86|x86_64) 227 i?86|x86_64)
211 detect_x86_amd64 228 detect_x86_amd64
229 ;;
230 alpha)
231 detect_alpha
232 ;;
233 powerpc*)
234 detect_ppc
212 ;; 235 ;;
213 *) 236 *)
214 PC="$(awk -F: '/^processor/{printf "Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>/dev/null)" 237 PC="$(awk -F: '/^processor/{printf "Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>/dev/null)"
215 ;; 238 ;;
216 esac 239 esac

Legend:
Removed from v.97  
changed lines
  Added in v.98

  ViewVC Help
Powered by ViewVC 1.1.20