/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 29 Revision 49
1#!/sbin/runscript 1#!/sbin/runscript
2# Copyright 1999-2002 Gentoo Technologies, Inc. 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.17 2005/01/29 21:54:59 wolf31o2 Exp $ 4# $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.25 2005/05/12 13:04:27 wolf31o2 Exp $
5 5
6echo "0" > /proc/sys/kernel/printk 6echo "0" > /proc/sys/kernel/printk
7DHCP="yes" 7DHCP="yes"
8DETECT="yes" 8DETECT="yes"
9GPM="yes" 9GPM="yes"
10PCMCIA="no" 10PCMCIA="no"
11HOTPLUG="yes" 11HOTPLUG="yes"
12APM="no" 12APM="no"
13ACPI="no" 13ACPI="no"
14IDEDMA="yes"
14CMDLINE="`cat /proc/cmdline`" 15CMDLINE="`cat /proc/cmdline`"
15for x in ${CMDLINE} ; do 16for x in ${CMDLINE} ; do
16 if [ "${x}" = "nodetect" ]; then 17 if [ "${x}" = "nodetect" ]; then
17 DETECT="no" 18 DETECT="no"
18 GPM="no" 19 GPM="no"
23 24
24 if [ "${x}" = "nodhcp" ]; then 25 if [ "${x}" = "nodhcp" ]; then
25 DHCP="no" 26 DHCP="no"
26 fi 27 fi
27 28
29 if [ "${x}" = "nogpm" ]; then
30 GPM="no"
31 fi
32
28 if [ "${x}" = "dopcmcia" ]; then 33 if [ "${x}" = "dopcmcia" ]; then
29 PCMCIA="yes" 34 PCMCIA="yes"
30 fi 35 fi
31 36
32 if [ "${x}" = "doapm" ]; then 37 if [ "${x}" = "doapm" ]; then
37 if [ "${x}" = "acpi=on" -o "${x}" = "acpi=force" ]; then 42 if [ "${x}" = "acpi=on" -o "${x}" = "acpi=force" ]; then
38 APM="no" 43 APM="no"
39 ACPI="yes" 44 ACPI="yes"
40 fi 45 fi
41 46
47 if [ "${x}" = "ide=nodma" ]; then
48 IDEDMA="no"
49 fi
50
42 if [ "${x}" = "nohotplug" ]; then 51 if [ "${x}" = "nohotplug" ]; then
43 HOTPLUG="no" 52 HOTPLUG="no"
44 fi 53 fi
45done 54done
46 55
47depend() { 56depend() {
48 need modules 57 need modules
58 use alsasound
59# provide gpm pcmcia apmd acpid coldplug
49} 60}
50 61
51start() { 62start() {
52 if [ "${DETECT}" = "yes" ]; then 63 if [ "${DETECT}" = "yes" ]; then
53 ebegin ${WARN}"Hardware detection started" 64 ebegin ${WARN}"Hardware detection started"
76 modprobe ac >/dev/null 2>&1 87 modprobe ac >/dev/null 2>&1
77 [ -x /etc/init.d/acpid ] && /etc/init.d/acpid start 88 [ -x /etc/init.d/acpid ] && /etc/init.d/acpid start
78 eend 89 eend
79 fi 90 fi
80 91
92 if [ "${IDEDMA}" = "yes" ]; then
93 [ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start
94 fi
95
81 if [ "${PCMCIA}" = "yes" ]; then 96 if [ "${PCMCIA}" = "yes" ]; then
82 ebegin ${HILITE} "PCMCIA enabled via cmdline" 97 ebegin ${HILITE} "PCMCIA enabled via cmdline"
83 /etc/init.d/pcmcia start 98 /etc/init.d/pcmcia start
84 fi 99 fi
85 100
86 if [ "${DHCP}" = "no" ]; then 101 if [ "${DHCP}" = "no" ]; then
87 sed -i -e '/^ifconfig_eth/ s//^#/' \ 102 sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
88 -e '/^iface_eth/ s//^#/' \ 103 -e '/^iface_eth.*dhcp.*/ s/^/#/' \
89 /etc/conf.d/net 104 /etc/conf.d/net
90 ebegin ${BAD}"Skipping DHCP broadcast detection as requested on boot commandline." 105 ebegin ${BAD}"Skipping DHCP broadcast detection as requested on boot commandline."
91 fi 106 fi
92 107
93 #Read in what hwsetup has found 108 #Read in what hwsetup has found
135 fi 150 fi
136 151
137 if [ -n "${NETDEVICES}" ]; then 152 if [ -n "${NETDEVICES}" ]; then
138 if [ "${DHCP}" = "yes" ]; then 153 if [ "${DHCP}" = "yes" ]; then
139 ebegin ${GOOD}"Network device${HILITE}${NETDEVICES}${GOOD} detected,${WARN} DHCP broadcasting for IP.${NORMAL}" 154 ebegin ${GOOD}"Network device${HILITE}${NETDEVICES}${GOOD} detected,${WARN} DHCP broadcasting for IP.${NORMAL}"
140 dhcpcd -h `basename hostname` & 155 dhcpcd -h $(hostname) &
141 fi 156 fi
142 eend 157 eend
143 158
144 else 159 else
145 ebegin ${BAD}"No Network device auto detected.${NORMAL}" 160 ebegin ${BAD}"No Network device auto detected.${NORMAL}"
155 ebegin ${WARN}" driver = ${SOUND_DRIVER}"${HILITE} 170 ebegin ${WARN}" driver = ${SOUND_DRIVER}"${HILITE}
156 if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ]; then 171 if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ]; then
157 amixer scontrols > /etc/amixer 172 amixer scontrols > /etc/amixer
158 if [ -n "`grep Master /etc/amixer`" ] 173 if [ -n "`grep Master /etc/amixer`" ]
159 then 174 then
160 amixer -q set Master 75% >/dev/null 2>&1
161 amixer -q set Master unmute >/dev/null 2>&1 175 amixer -q set Master 95% unmute >/dev/null 2>&1
162 fi 176 fi
163 if [ -n "`grep PCM /etc/amixer`" ] 177 if [ -n "`grep PCM /etc/amixer`" ]
164 then 178 then
165 amixer -q set PCM 75% >/dev/null 2>&1
166 amixer -q set PCM unmute >/dev/null 2>&1 179 amixer -q set PCM 95% unmute >/dev/null 2>&1
167 fi 180 fi
168 if [ -n "`grep Mic /etc/amixer`" ] 181 if [ -n "`grep Mic /etc/amixer`" ]
169 then 182 then
170 amixer -q set Mic 75% >/dev/null 2>&1
171 amixer -q set Mic cap >/dev/null 2>&1 183 amixer -q set Mic 95% unmute cap >/dev/null 2>&1
172 fi 184 fi
173 if [ -n "`grep Wave /etc/amixer`" ] 185 if [ -n "`grep Wave /etc/amixer`" ]
174 then 186 then
175 amixer -q set Wave 75% >/dev/null 2>&1
176 amixer -q set Wave unmute >/dev/null 2>&1 187 amixer -q set Wave 95% unmute >/dev/null 2>&1
177 fi 188 fi
178 if [ -n "`grep Capture /etc/amixer`" ] 189 if [ -n "`grep Capture /etc/amixer`" ]
179 then 190 then
180 amixer -q set Capture 75% >/dev/null 2>&1
181 amixer -q set Capture cap >/dev/null 2>&1
182 amixer -q set Capture unmute >/dev/null 2>&1 191 amixer -q set Capture 95% unmute cap >/dev/null 2>&1
183 fi 192 fi
184 fi 193 fi
185 fi 194 fi
186 195
187 196

Legend:
Removed from v.29  
changed lines
  Added in v.49

  ViewVC Help
Powered by ViewVC 1.1.20