/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 113 Revision 114
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.64 2006/07/14 02:27:45 wolf31o2 Exp $ 4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.65 2006/07/16 13:45:42 wolf31o2 Exp $
5 5
6DHCP="yes" 6DHCP="yes"
7DETECT="yes" 7DETECT="yes"
8GPM="yes" 8GPM="yes"
9PCMCIA="no" 9PCMCIA="no"
70# Checks whether a service will be started by autoconfig. 70# Checks whether a service will be started by autoconfig.
71# Usage: check_svc var service [service_alternative] 71# Usage: check_svc var service [service_alternative]
72check_svc() { 72check_svc() {
73 if [ "${1}" = "yes" ] 73 if [ "${1}" = "yes" ]
74 then 74 then
75 if [ -x "/etc/init.d/$2" ] 75 if [ -x "/etc/init.d/${2}" ]
76 then 76 then
77 echo "${2}" 77 echo "${2}"
78 elif [ -n "${3}" -a -x "/etc/init.d/${3}" ] 78 elif [ -n "${3}" -a -x "/etc/init.d/${3}" ]
79 then 79 then
80 echo "${3}" 80 echo "${3}"
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# tmp=$([[ $'\n'$(</proc/cpuinfo) =~ $'\n''$1[[:space:]]\+:' ]] | head -n 1 | cut -d" " -f3-)
120 eval "$2='${tmp}'" 120 eval "${2}='${tmp}'"
121 fi 121 fi
122} 122}
123 123
124detect_mips() { 124detect_mips() {
125 get_info "cpu model" cpuinfo 125 get_info "cpu model" cpuinfo
153 get_info "model name" cpuinfo 153 get_info "model name" cpuinfo
154 fi 154 fi
155 get_info "cpu MHz" mhz 155 get_info "cpu MHz" mhz
156 mhz="${mhz%%.*}MHz" 156 mhz="${mhz%%.*}MHz"
157 157
158 PC="Detected ${numcpu} ${cpuinfo} CPU(s) @ ${mhz} each" 158 PC="Detected ${numcpu} ${cpuinfo} CPU(s) @ ${mhz}"
159} 159}
160 160
161detect_alpha() { 161detect_alpha() {
162 get_info "platform string" machinfo 162 get_info "platform string" machinfo
163 get_info "cpu" cpuinfo1 163 get_info "cpu" cpuinfo1
322 then 322 then
323 einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..." 323 einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
324 source /etc/sysconfig/mouse 324 source /etc/sysconfig/mouse
325 if [ -x /usr/sbin/gpm ] 325 if [ -x /usr/sbin/gpm ]
326 then 326 then
327# if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ] 327 if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]
328 if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSE=${MOUSETYPE}' ]]) ] 328# if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSE=${MOUSETYPE}' ]]) ]
329 then 329 then
330 sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm 330 sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
331 else 331 else
332 echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm 332 echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
333 fi 333 fi
334 334
335# if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ] 335 if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]
336 if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSEDEV=${DEVICE}' ]]) ] 336# if [ $([[ $'\n'$(</etc/conf.d/gpm) =~ $'\n''#MOUSEDEV=${DEVICE}' ]]) ]
337 then 337 then
338 sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm 338 sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
339 else 339 else
340 echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm 340 echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
341 fi 341 fi
426 fi 426 fi
427 else 427 else
428 ewarn "Skipping ALSA detection as requested on command line ..." 428 ewarn "Skipping ALSA detection as requested on command line ..."
429 fi 429 fi
430 430
431 [ -n "${XDESC}" ] && einfo "VideoCard: ${HILITE}${XDESC}${NORMAL}"
432
431 if [ "${X11}" = "yes" ] 433 if [ "${X11}" = "yes" ]
432 then 434 then
433 if [ -x /etc/init.d/x-setup ] 435 if [ -x /etc/init.d/x-setup ]
434 then 436 then
435 start_service x-setup 437 start_service x-setup
439 fi 441 fi
440 else 442 else
441 touch /etc/init.d/.noxdm 443 touch /etc/init.d/.noxdm
442 fi 444 fi
443 445
444# [ -n "${XDESC}" ] && einfo "VideoCard: ${HILITE}${XDESC}${NORMAL}"
445
446 killall hwsetup 2>/dev/null 446 killall hwsetup 2>/dev/null
447 echo "6" > /proc/sys/kernel/printk 447 echo "6" > /proc/sys/kernel/printk
448} 448}
449 449
450# vim: ts=4 450# vim: ts=4

Legend:
Removed from v.113  
changed lines
  Added in v.114

  ViewVC Help
Powered by ViewVC 1.1.20