/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 19 Revision 20
1#!/sbin/runscript 1#!/sbin/runscript
2# Copyright 1999-2002 Gentoo Technologies, Inc. 2# Copyright 1999-2002 Gentoo Technologies, Inc.
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.10 2004/11/20 14:11:24 wolf31o2 Exp $ 4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.11 2004/11/25 04:42:53 wolf31o2 Exp $
5 5
6echo "0" > /proc/sys/kernel/printk 6echo "0" > /proc/sys/kernel/printk
7DHCP="yes" 7DHCP="yes"
8DETECT="yes" 8DETECT="yes"
9PCMCIA="no" 9PCMCIA="no"
47} 47}
48 48
49start() { 49start() {
50 if [ "${DETECT}" = "yes" ]; then 50 if [ "${DETECT}" = "yes" ]; then
51 ebegin ${WARN}"Hardware detection started" 51 ebegin ${WARN}"Hardware detection started"
52 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` 52 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`
53 ebegin ${GOOD}"${PC}" 53 ebegin ${GOOD}"${PC}"
54 eend 54 eend
55 [ -x /usr/sbin/hwsetup ] && hwsetup -p >/dev/null 55 [ -x /usr/sbin/hwsetup ] && hwsetup -p >/dev/null
56 eend 56 eend
57 else 57 else
115 if [ "${DETECT}" = "no" ]; then 115 if [ "${DETECT}" = "no" ]; then
116 DHCP="no" 116 DHCP="no"
117 fi 117 fi
118 118
119 if [ "${DETECT}" = "yes" ]; then 119 if [ "${DETECT}" = "yes" ]; then
120 NETDEVICES="`awk -F: '/eth.:|tr.:/{print ${1}}' /proc/net/dev 2>/dev/null`" 120 NETDEVICES="`awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null`"
121 fi 121 fi
122 122
123 if [ -n "${NETDEVICES}" ]; then 123 if [ -n "${NETDEVICES}" ]; then
124 if [ "${DHCP}" = "yes" ]; then 124 if [ "${DHCP}" = "yes" ]; then
125 ebegin ${GOOD}"Network device${HILITE}${NETDEVICES}${GOOD} detected,${WARN} DHCP broadcasting for IP.${NORMAL}" 125 ebegin ${GOOD}"Network device${HILITE}${NETDEVICES}${GOOD} detected,${WARN} DHCP broadcasting for IP.${NORMAL}"

Legend:
Removed from v.19  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.20