/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 31 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.19 2005/01/30 20:53:29 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"
41 if [ "${x}" = "acpi=on" -o "${x}" = "acpi=force" ]; then 42 if [ "${x}" = "acpi=on" -o "${x}" = "acpi=force" ]; then
42 APM="no" 43 APM="no"
43 ACPI="yes" 44 ACPI="yes"
44 fi 45 fi
45 46
47 if [ "${x}" = "ide=nodma" ]; then
48 IDEDMA="no"
49 fi
50
46 if [ "${x}" = "nohotplug" ]; then 51 if [ "${x}" = "nohotplug" ]; then
47 HOTPLUG="no" 52 HOTPLUG="no"
48 fi 53 fi
49done 54done
50 55
51depend() { 56depend() {
52 need modules 57 need modules
53 before * 58 use alsasound
59# provide gpm pcmcia apmd acpid coldplug
54} 60}
55 61
56start() { 62start() {
57 if [ "${DETECT}" = "yes" ]; then 63 if [ "${DETECT}" = "yes" ]; then
58 ebegin ${WARN}"Hardware detection started" 64 ebegin ${WARN}"Hardware detection started"
81 modprobe ac >/dev/null 2>&1 87 modprobe ac >/dev/null 2>&1
82 [ -x /etc/init.d/acpid ] && /etc/init.d/acpid start 88 [ -x /etc/init.d/acpid ] && /etc/init.d/acpid start
83 eend 89 eend
84 fi 90 fi
85 91
92 if [ "${IDEDMA}" = "yes" ]; then
93 [ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start
94 fi
95
86 if [ "${PCMCIA}" = "yes" ]; then 96 if [ "${PCMCIA}" = "yes" ]; then
87 ebegin ${HILITE} "PCMCIA enabled via cmdline" 97 ebegin ${HILITE} "PCMCIA enabled via cmdline"
88 /etc/init.d/pcmcia start 98 /etc/init.d/pcmcia start
89 fi 99 fi
90 100
91 if [ "${DHCP}" = "no" ]; then 101 if [ "${DHCP}" = "no" ]; then
92 sed -i -e '/^ifconfig_eth/ s//^#/' \ 102 sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
93 -e '/^iface_eth/ s//^#/' \ 103 -e '/^iface_eth.*dhcp.*/ s/^/#/' \
94 /etc/conf.d/net 104 /etc/conf.d/net
95 ebegin ${BAD}"Skipping DHCP broadcast detection as requested on boot commandline." 105 ebegin ${BAD}"Skipping DHCP broadcast detection as requested on boot commandline."
96 fi 106 fi
97 107
98 #Read in what hwsetup has found 108 #Read in what hwsetup has found
140 fi 150 fi
141 151
142 if [ -n "${NETDEVICES}" ]; then 152 if [ -n "${NETDEVICES}" ]; then
143 if [ "${DHCP}" = "yes" ]; then 153 if [ "${DHCP}" = "yes" ]; then
144 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}"
145 dhcpcd -h `basename hostname` & 155 dhcpcd -h $(hostname) &
146 fi 156 fi
147 eend 157 eend
148 158
149 else 159 else
150 ebegin ${BAD}"No Network device auto detected.${NORMAL}" 160 ebegin ${BAD}"No Network device auto detected.${NORMAL}"
160 ebegin ${WARN}" driver = ${SOUND_DRIVER}"${HILITE} 170 ebegin ${WARN}" driver = ${SOUND_DRIVER}"${HILITE}
161 if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ]; then 171 if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ]; then
162 amixer scontrols > /etc/amixer 172 amixer scontrols > /etc/amixer
163 if [ -n "`grep Master /etc/amixer`" ] 173 if [ -n "`grep Master /etc/amixer`" ]
164 then 174 then
165 amixer -q set Master 75% >/dev/null 2>&1
166 amixer -q set Master unmute >/dev/null 2>&1 175 amixer -q set Master 95% unmute >/dev/null 2>&1
167 fi 176 fi
168 if [ -n "`grep PCM /etc/amixer`" ] 177 if [ -n "`grep PCM /etc/amixer`" ]
169 then 178 then
170 amixer -q set PCM 75% >/dev/null 2>&1
171 amixer -q set PCM unmute >/dev/null 2>&1 179 amixer -q set PCM 95% unmute >/dev/null 2>&1
172 fi 180 fi
173 if [ -n "`grep Mic /etc/amixer`" ] 181 if [ -n "`grep Mic /etc/amixer`" ]
174 then 182 then
175 amixer -q set Mic 75% >/dev/null 2>&1
176 amixer -q set Mic cap >/dev/null 2>&1 183 amixer -q set Mic 95% unmute cap >/dev/null 2>&1
177 fi 184 fi
178 if [ -n "`grep Wave /etc/amixer`" ] 185 if [ -n "`grep Wave /etc/amixer`" ]
179 then 186 then
180 amixer -q set Wave 75% >/dev/null 2>&1
181 amixer -q set Wave unmute >/dev/null 2>&1 187 amixer -q set Wave 95% unmute >/dev/null 2>&1
182 fi 188 fi
183 if [ -n "`grep Capture /etc/amixer`" ] 189 if [ -n "`grep Capture /etc/amixer`" ]
184 then 190 then
185 amixer -q set Capture 75% >/dev/null 2>&1
186 amixer -q set Capture cap >/dev/null 2>&1
187 amixer -q set Capture unmute >/dev/null 2>&1 191 amixer -q set Capture 95% unmute cap >/dev/null 2>&1
188 fi 192 fi
189 fi 193 fi
190 fi 194 fi
191 195
192 196

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

  ViewVC Help
Powered by ViewVC 1.1.20