/[livecd-tools]/trunk/autoconfig
Gentoo

Contents of /trunk/autoconfig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 148 - (hide annotations) (download)
Thu Apr 3 00:29:51 2008 UTC (10 years, 6 months ago) by wolf31o2
File size: 12620 byte(s)
Make sure /etc/sysconfig exists before running hwsetup for bug #215824.
1 zhen 2 #!/sbin/runscript
2 zhen 4
3 wolf31o2 139 # This script is used by Gentoo release media to start certain services and to
4     # ensure a sane setup for a CD-based boot.
5    
6 wolf31o2 140 ACPI="yes"
7 wolf31o2 138 ALSA="yes"
8     APM="no"
9 wolf31o2 142 BRLTTY="no"
10 wolf31o2 138 DETECT="yes"
11 zhen 2 DHCP="yes"
12 wolf31o2 140 DMRAID="yes"
13     EVMS="no"
14     FIREWIRE="yes"
15 wolf31o2 24 GPM="yes"
16 wolf31o2 141 HALD="yes"
17 zhen 2 HOTPLUG="yes"
18 wolf31o2 49 IDEDMA="yes"
19 wolf31o2 140 LVM="no"
20     MDADM="yes"
21     NET="yes"
22 wolf31o2 138 NFS="yes"
23 wolf31o2 140 PASSWD="yes"
24     PATA="yes"
25 wolf31o2 138 PCMCIA="yes"
26 wolf31o2 140 SATA="yes"
27     SCSI="no"
28 wolf31o2 138 SSHD="no"
29 wolf31o2 140 USB="yes"
30 wolf31o2 76 X11="yes"
31 wolf31o2 51
32 wolf31o2 68 get_config() {
33     CMDLINE="$(cat /proc/cmdline)"
34 wolf31o2 51
35 wolf31o2 68 for x in ${CMDLINE} ; do
36 wolf31o2 78 case "${x}" in
37 wolf31o2 140 # We put nodetect first, so we can override it with do* commands
38 wolf31o2 78 nodetect)
39 wolf31o2 138 ACPI="no"
40     ALSA="no"
41     APM="no"
42 wolf31o2 78 DETECT="no"
43 wolf31o2 140 DMRAID="no"
44     EVMS="no"
45     FIREWIRE="no"
46 wolf31o2 78 GPM="no"
47 wolf31o2 141 HALD="no"
48 wolf31o2 78 HOTPLUG="no"
49 wolf31o2 140 LVM="no"
50     MDADM="no"
51     NET="no"
52 wolf31o2 138 NFS="no"
53 wolf31o2 140 PCMCIA="no"
54     PATA="no"
55     SATA="no"
56     SCSI="no"
57     USB="no"
58 wolf31o2 78 X11="no"
59     ;;
60 wolf31o2 140 noapm)
61     APM="no"
62     ;;
63 wolf31o2 78 nodhcp)
64     DHCP="no"
65     ;;
66 wolf31o2 140 nodmraid)
67     DMRAID="no"
68     ;;
69     noevms|noevms2)
70     EVMS="no"
71     ;;
72     nofirewire)
73     FIREWIRE="no"
74     ;;
75 wolf31o2 78 nogpm)
76     GPM="no"
77     ;;
78 wolf31o2 139 nohotplug)
79     HOTPLUG="no"
80 wolf31o2 78 ;;
81 wolf31o2 140 noload=*)
82     NOLOAD="$*"
83     ;;
84     nolvm|nolvm2)
85     LVM="no"
86     ;;
87     nomdadm)
88     MDADM="no"
89     ;;
90     nonet)
91     NET="no"
92     ;;
93 wolf31o2 139 nonfs)
94     NFS="no"
95     ;;
96 wolf31o2 140 nopata)
97     PATA="no"
98     ;;
99     nopcmcia)
100     PCMCIA="no"
101     ;;
102     nosata)
103     SATA="no"
104     ;;
105     noscsi)
106     SCSI="no"
107     ;;
108     nosshd)
109     SSHD="no"
110     ;;
111 wolf31o2 139 nosound)
112     ALSA="no"
113     ;;
114 wolf31o2 140 nousb)
115     USB="no"
116 wolf31o2 143 ;;
117 wolf31o2 139 nox)
118     X11="no"
119     ;;
120 wolf31o2 140 acpi\=on|acpi\=force)
121     ACPI="yes"
122     APM="no"
123     ;;
124 wolf31o2 142 brltty=*)
125     BRLTTY="yes"
126     ;;
127     ide\=nodma)
128     IDEDMA="no"
129     ;;
130 wolf31o2 78 doapm)
131 wolf31o2 138 ACPI="no"
132 wolf31o2 78 APM="yes"
133     ;;
134 wolf31o2 140 dodhcp)
135     DHCP="yes"
136 wolf31o2 78 ;;
137 wolf31o2 140 dodmraid)
138     DMRAID="yes"
139     ;;
140     doevms|doevms2)
141     EVMS="yes"
142     ;;
143     dofirewire)
144     FIREWIRE="yes"
145     ;;
146     dogpm)
147     GPM="yes"
148     ;;
149     dohotplug)
150     HOTPLUG="yes"
151     ;;
152     dolvm|dolvm2)
153     LVM="yes"
154     ;;
155     domdadm)
156     MDADM="yes"
157     ;;
158     donet)
159     NET="yes"
160     ;;
161     dopata)
162     PATA="yes"
163     ;;
164 wolf31o2 139 dopcmcia)
165     PCMCIA="yes"
166 wolf31o2 78 ;;
167 wolf31o2 140 dosata)
168     SATA="yes"
169     ;;
170     doscsi)
171     SCSI="yes"
172     ;;
173 wolf31o2 138 dosshd)
174     SSHD="yes"
175     ;;
176 wolf31o2 140 dosound)
177     SOUND="yes"
178     ;;
179     dousb)
180     USE="yes"
181     ;;
182     dox)
183     X11="yes"
184     ;;
185     passwd=*)
186     PASSWD="no"
187     PASSWORD="$*"
188     ;;
189 wolf31o2 78 esac
190 wolf31o2 68 done
191     }
192    
193 zhen 2 depend() {
194     need modules
195 wolf31o2 50 before net
196 zhen 2 }
197    
198 wolf31o2 69 # Checks whether a service will be started by autoconfig.
199     # Usage: check_svc var service [service_alternative]
200     check_svc() {
201 wolf31o2 113 if [ "${1}" = "yes" ]
202 wolf31o2 78 then
203 wolf31o2 114 if [ -x "/etc/init.d/${2}" ]
204 wolf31o2 78 then
205 wolf31o2 113 echo "${2}"
206     elif [ -n "${3}" -a -x "/etc/init.d/${3}" ]
207 wolf31o2 78 then
208 wolf31o2 113 echo "${3}"
209 wolf31o2 69 fi
210     fi
211     }
212    
213     # Prints an ordered list of services that will be started by autoconfig.
214     list_services() {
215     get_config
216    
217 wolf31o2 140 local svcs="$(check_svc ${ACPI} acpid)"
218     svcs="${svcs} $(check_svc ${ALSA} alsasound)"
219     svcs="${svcs} $(check_svc ${APM} apmd)"
220 wolf31o2 69 svcs="${svcs} $(check_svc ${GPM} gpm)"
221 wolf31o2 141 svcs="${svcs} $(check_svc ${HALD} hald)"
222 wolf31o2 69 svcs="${svcs} $(check_svc ${HOTPLUG} coldplug hotplug)"
223 wolf31o2 140 svcs="${svcs} $(check_svc ${IDEDMA} hdparm)"
224 wolf31o2 138 svcs="${svcs} $(check_svc ${NFS} nfsmount)"
225 agaffney 145 svcs="${svcs} $(check_svc ${PASSWD} pwgen)"
226 wolf31o2 140 svcs="${svcs} $(check_svc ${PCMCIA} pcmcia)"
227 wolf31o2 138 svcs="${svcs} $(check_svc ${SSH} sshd)"
228 wolf31o2 115 svcs="${svcs} $(check_svc ${X11} mkxf86config x-setup)"
229 wolf31o2 69
230 wolf31o2 140 ### TODO: make this baselayout-2 compatible
231 wolf31o2 141 ### TODO: make these checks accurate using service dependencies
232 wolf31o2 140
233 wolf31o2 69 echo ${svcs}
234     }
235    
236 wolf31o2 101 unpack_firmware() {
237     # This unpacks any firmware tarballs.
238     if [ -e /lib/firmware.tar.bz2 ]
239     then
240     ebegin "Unpacking hotplug firmware"
241     tar xjf /lib/firmware.tar.bz2 -C /lib/firmware
242     eend 0
243     fi
244     }
245    
246 wolf31o2 109 get_info() {
247     local tmp
248    
249     if [ ! -z "${1}" -a ! -z "${2}" ]
250     then
251 wolf31o2 112 tmp=$(grep "^$1[[:space:]]\+:" /proc/cpuinfo | head -n 1 | cut -d" " -f3-)
252 wolf31o2 114 eval "${2}='${tmp}'"
253 wolf31o2 109 fi
254     }
255    
256 wolf31o2 81 detect_mips() {
257 wolf31o2 109 get_info "cpu model" cpuinfo
258     get_info "system type" machinfo
259     cpuinfo="${cpuinfo%% FPU*}"
260 wolf31o2 79
261     case "${machinfo}" in
262     "SGI Indigo2")
263     case "${cpuinfo}" in
264     R4*)
265 wolf31o2 109 machinfo="SGI Indigo2" # I2 R4x00
266 wolf31o2 79 ;;
267     R8*)
268 wolf31o2 109 machinfo="SGI Indigo2 Power" # I2 R8000
269 wolf31o2 79 ;;
270     R10*)
271 wolf31o2 109 machinfo="SGI Indigo2 Impact" # I2 R10000
272 wolf31o2 79 ;;
273     esac
274     ;;
275     esac
276    
277 wolf31o2 109 PC="Detected an ${machinfo} w/ ${numcpu} ${cpuinfo} CPU(s)"
278 wolf31o2 79 }
279    
280 wolf31o2 109 detect_x86_amd64_ia64() {
281 wolf31o2 112 if [ "${1}" = "ia64" ]
282     then
283     get_info "family" cpuinfo
284     else
285     get_info "model name" cpuinfo
286     fi
287 wolf31o2 109 get_info "cpu MHz" mhz
288 wolf31o2 112 mhz="${mhz%%.*}MHz"
289 wolf31o2 79
290 wolf31o2 114 PC="Detected ${numcpu} ${cpuinfo} CPU(s) @ ${mhz}"
291 wolf31o2 81 }
292    
293 wolf31o2 98 detect_alpha() {
294 wolf31o2 109 get_info "platform string" machinfo
295     get_info "cpu" cpuinfo1
296     get_info "cpu model" cpuinfo2
297     get_info "cpus detected" numcpu
298    
299     PC="Detected ${numcpu} ${cpuinfo1} ${cpuinfo2} CPU(s) in a ${machinfo} system"
300 wolf31o2 98 }
301    
302 wolf31o2 89 detect_ppc() {
303 wolf31o2 109 get_info "cpu" cpuinfo
304     get_info "clock" mhz
305     get_info "detected as" machinfo
306     machinfo="${machinfo##*\(}"
307     machinfo="${machinfo%%\)*}"
308    
309 wolf31o2 89 local machtype=""
310    
311     case "${machinfo}" in
312 wolf31o2 120 "CHRP Pegasos2")
313     machtype="Pegasos 2"
314 wolf31o2 89 ;;
315 wolf31o2 120 "CHRP IBM,9124-720")
316     machtype="IBM OP720"
317 wolf31o2 90 ;;
318     "iBook 2 rev. 2")
319     machtype="Apple iBook G3"
320     ;;
321 wolf31o2 120 "iMac G5"*)
322     machtype="Apple iMac G5"
323     ;;
324     "MPC8241")
325     machtype="Kurobox"
326     ;;
327 wolf31o2 92 "PowerMac G5")
328     machtype="Apple PowerMac G5"
329     ;;
330 wolf31o2 90 "PowerMac G5 Dual Core")
331     machtype="Apple PowerMac G5 Dual Core"
332     ;;
333 wolf31o2 120 "PowerMac G4 AGP Graphics")
334     machtype="Apple PowerMac G4"
335     ;;
336 wolf31o2 144 "PowerBook Titanium"|"PowerBook G4 15\"")
337 wolf31o2 120 machtype="Apple Powerbook G4"
338     ;;
339 wolf31o2 90 "Unknown Intrepid-based")
340     machtype="Apple Mac-Mini"
341     ;;
342 wolf31o2 89 *)
343     machtype="Unknown PPC System"
344     ;;
345     esac
346    
347 wolf31o2 109 PC="Detected a(n) ${machtype} w/ ${numcpu} ${cpuinfo} CPU(s)"
348 wolf31o2 89 }
349    
350 wolf31o2 109 detect_sparc() {
351     get_info "cpu" cpuinfo
352     get_info "ncpus active" numcpu
353     get_info "ncpus probed" numprobed
354    
355     PC="Detected ${numcpu} active ${cpuinfo} CPU(s) of ${numprobed} total"
356     }
357    
358 zhen 2 start() {
359 wolf31o2 69 echo "0" > /proc/sys/kernel/printk
360 wolf31o2 68 get_config
361 wolf31o2 130
362 wolf31o2 144 # First off, we want hotplug/coldplug enabled, so we re-enable it.
363     # We do this even if we are not starting up the hotplug/coldplug
364 wolf31o2 130 # services for the installer.
365     sed -i 's/RC_COLDPLUG="no"/RC_COLDPLUG="yes"/' /etc/conf.d/rc
366 wolf31o2 142
367     if [ "${BRLTTY}" = "yes" ]
368 wolf31o2 130 then
369 wolf31o2 142 [ -x /etc/init.d/brltty ] && start_service brltty
370 wolf31o2 130 fi
371    
372 wolf31o2 51 if [ "${DETECT}" = "yes" ]
373     then
374 wolf31o2 78 ebegin "Hardware detection started"
375 wolf31o2 112 local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)"
376 wolf31o2 80 local arch="$(uname -m)"
377 wolf31o2 109
378 wolf31o2 81 case ${arch} in
379 wolf31o2 109 mips*)
380 wolf31o2 81 detect_mips
381 wolf31o2 109 ACPI="no"
382     APM="no"
383     IDEDMA="no"
384 wolf31o2 81 ;;
385 wolf31o2 113 i?86|x86_64)
386 wolf31o2 109 detect_x86_amd64_ia64
387 wolf31o2 81 ;;
388 wolf31o2 98 alpha)
389     detect_alpha
390 wolf31o2 109 ACPI="no"
391     APM="no"
392 wolf31o2 98 ;;
393 wolf31o2 109 sparc*)
394     detect_sparc
395     ACPI="no"
396     APM="no"
397     ;;
398 wolf31o2 98 powerpc*)
399     detect_ppc
400 wolf31o2 109 ACPI="no"
401     APM="no"
402 wolf31o2 98 ;;
403 wolf31o2 109 ia64)
404     detect_x86_amd64_ia64 "ia64"
405     APM="no"
406     ;;
407 wolf31o2 81 *)
408 wolf31o2 109 PC=
409 wolf31o2 81 ;;
410     esac
411 wolf31o2 109 [ -n "${PC}" ] && einfo "${PC}"
412 zhen 2 eend
413 wolf31o2 6 else
414 wolf31o2 78 ewarn "Hardware detection disabled via cmdline ..."
415 wolf31o2 6 fi
416 zhen 2
417 wolf31o2 144 # Now, we check if we are supposed to run a coldplug script.
418 wolf31o2 142 if [ "${HOTPLUG}" = "yes" ]
419     then
420     # Check whether we should be using hotplug/coldplug or whether we should
421     # just let udev do it all.
422     if [ -x /etc/init.d/coldplug ]
423     then
424     start_service coldplug
425     elif [ -x /etc/init.d/hotplug ]
426     then
427     start_service hotplug
428     else
429     unpack_firmware
430     [ -x /sbin/udevtrigger ] && /sbin/udevtrigger
431     fi
432 wolf31o2 148 [ -e /etc/sysconfig ] || mkdir -p /etc/sysconfig
433 wolf31o2 142 [ -x /usr/sbin/hwsetup ] && hwsetup
434     else
435     ewarn "Hotplug/Coldplug disabled via cmdline ..."
436     fi
437    
438 wolf31o2 51 if [ "${APM}" = "yes" ]
439     then
440 wolf31o2 78 modprobe apm power_off=1 >/dev/null 2>&1 && \
441     einfo "APM BIOS found, power management functions enabled ..."
442 wolf31o2 77 [ -x /etc/init.d/apmd ] && start_service apmd
443 zhen 2 else
444 wolf31o2 109 einfo "Not Loading APM Bios support ..."
445 wolf31o2 6 fi
446 zhen 2
447 wolf31o2 51 if [ "${ACPI}" = "yes" ]
448     then
449 wolf31o2 78 modprobe processor >/dev/null 2>&1 && \
450     ebegin "ACPI power management functions enabled" && \
451     modprobe thermal >/dev/null
452 wolf31o2 29 modprobe fan >/dev/null 2>&1
453     modprobe button >/dev/null 2>&1
454     modprobe battery >/dev/null 2>&1
455     modprobe ac >/dev/null 2>&1
456 wolf31o2 131 modprobe thermal >/dev/null 2>&1
457     modprobe video >/dev/null 2>&1
458     modprobe dock >/dev/null 2>&1
459 wolf31o2 77 [ -x /etc/init.d/acpid ] && start_service acpid
460 wolf31o2 6 eend
461 wolf31o2 78 else
462 wolf31o2 109 einfo "Not Loading ACPI support ..."
463 wolf31o2 6 fi
464 zhen 2
465 wolf31o2 51 if [ "${IDEDMA}" = "yes" ]
466     then
467 wolf31o2 109 [ -x /etc/init.d/hdparm ] && start_service hdparm
468 wolf31o2 138 else
469     ewarn "Disabling IDE DMA support ..."
470 wolf31o2 49 fi
471    
472 wolf31o2 51 if [ "${PCMCIA}" = "yes" ]
473     then
474 wolf31o2 77 [ -x /etc/init.d/pcmcia ] && start_service pcmcia
475 wolf31o2 138 else
476     ewarn "PCMCIA disabled via cmdline ..."
477 wolf31o2 6 fi
478 zhen 2
479 wolf31o2 51 if [ "${DHCP}" = "no" ]
480     then
481 wolf31o2 48 sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
482     -e '/^iface_eth.*dhcp.*/ s/^/#/' \
483 wolf31o2 55 -e '/^config_eth.*dhcp.*/ s/^/#/' \
484 wolf31o2 25 /etc/conf.d/net
485 wolf31o2 118 for i in `seq 0 4`
486     do
487 wolf31o2 139 echo "config_eth${i}=( \"none\" )" >> /etc/conf.d/net
488 wolf31o2 118 done
489 wolf31o2 138 ewarn "Skipping DHCP broadcast ..."
490 wolf31o2 6 fi
491 zhen 2
492 wolf31o2 78 # Read in what hwsetup has found
493 wolf31o2 139 [ -f /etc/sysconfig/gentoo ] && source /etc/sysconfig/gentoo
494 zhen 2
495 wolf31o2 6 # Mouse
496 wolf31o2 51 if [ -n "${MOUSE_DEVICE}" ]
497     then
498 wolf31o2 78 einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
499 wolf31o2 6 source /etc/sysconfig/mouse
500 wolf31o2 51 if [ -x /usr/sbin/gpm ]
501     then
502 wolf31o2 114 if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]
503 wolf31o2 110 then
504     sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
505     else
506     echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
507     fi
508 wolf31o2 78
509 wolf31o2 114 if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]
510 wolf31o2 110 then
511     sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
512     else
513     echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
514     fi
515 wolf31o2 78
516     [ "${GPM}" = "yes" ] \
517     && [ -x /etc/init.d/gpm ] && start_service gpm
518 wolf31o2 29 fi
519 wolf31o2 6 fi
520 zhen 2
521 wolf31o2 78 [ "${DETECT}" = "no" ] && DHCP="no"
522     [ "${DETECT}" = "yes" ] \
523     && NETDEVICES="$(awk -F: '/eth.:|tr.:|ath.:|wlan.:/{print $1}' /proc/net/dev 2>/dev/null)"
524 zhen 2
525 wolf31o2 51 if [ -n "${NETDEVICES}" ]
526     then
527 wolf31o2 74 for nics in ${NETDEVICES}
528     do
529     if [ "${DHCP}" = "yes" ]
530     then
531 wolf31o2 78 einfo "Network device ${HILITE}${nics}${NORMAL} detected, DHCP broadcasting for IP ..."
532 wolf31o2 135 if [ -f /var/run/dhcpcd-${nics}.pid ]
533     then
534 wolf31o2 137 if [ -z "$(/sbin/ifconfig ${nics} | grep 'inet addr')" ]
535 wolf31o2 135 then
536     kill $(cat /var/run/dhcpcd-${nics}.pid)
537     sleep 2
538     dhcpcd -n -h $(hostname) ${nics}
539     fi
540     fi
541 wolf31o2 74 fi
542     done
543 agaffney 147 if [ "${NFS}" = "yes" ]
544     then
545     [ -x /etc/init.d/portmap ] && start_service portmap
546     [ -x /etc/init.d/nfsmount ] && start_service nfsmount
547     fi
548 wolf31o2 140 if [ "${PASSWD}" = "no" ]
549     then
550     echo "root:${PASSWORD}" | chpasswd > /dev/null 2>&1
551     else
552     start_service pwgen
553     fi
554 wolf31o2 138 if [ "${SSHD}" = "yes" ]
555     then
556 wolf31o2 144 # If we have passwd= on the command line, we do not run pwgen and we
557 wolf31o2 140 # set the root password to PASSWORD.
558     if [ "${PASSWD}" = "yes" ]
559     then
560     ewarn "WARNING: You are starting sshd with a scrambled root password!!!"
561     ewarn "WARNING: You need to set a root password to be able to login remotely."
562     fi
563 wolf31o2 138 [ -x /etc/init.d/sshd ] && start_service sshd
564     fi
565 zhen 2 else
566 wolf31o2 78 ewarn "No Network device auto detected ..."
567 wolf31o2 6 fi
568 zhen 2
569 wolf31o2 68 if [ "${ALSA}" = "yes" ]
570 wolf31o2 51 then
571 wolf31o2 68 if [ -n "${SOUND_FULLNAME}" -o -n "${SOUND_DRIVER}" ]
572 wolf31o2 51 then
573 wolf31o2 78 local sndmsg="Soundcard:\n"
574    
575     [ -n "${SOUND_FULLNAME}" ] \
576     && sndmsg="${sndmsg} ${WARN}${SOUND_FULLNAME}\n"
577     [ -n "${SOUND_DRIVER}" ] \
578     && sndmsg="${sndmsg} driver = ${SOUND_DRIVER}\n"
579    
580     einfo "${sndmsg}"
581    
582 wolf31o2 70 if [ -x /etc/init.d/alsasound ]
583     then
584 wolf31o2 77 start_service alsasound
585 wolf31o2 70 fi
586 wolf31o2 78
587 wolf31o2 82 if [ -e /proc/asound/cards ]
588     then
589 wolf31o2 102 for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])
590 wolf31o2 82 do
591     if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]
592     then
593     amixer -c $i scontrols > /etc/amixer
594     [ -n "$(grep Master /etc/amixer)" ] \
595     && amixer -c $i -q set Master 95% unmute \
596     >/dev/null 2>&1
597     [ -n "$(grep PCM /etc/amixer)" ] \
598     && amixer -c $i -q set PCM 95% unmute \
599     >/dev/null 2>&1
600     [ -n "$(grep Mic /etc/amixer)" ] \
601     && amixer -c $i -q set Mic 95% mute cap \
602     >/dev/null 2>&1
603     [ -n "$(grep Wave /etc/amixer)" ] \
604     && amixer -c $i -q set Wave 95% unmute \
605     >/dev/null 2>&1
606     [ -n "$(grep Capture /etc/amixer)" ] \
607     && amixer -c $i -q set Capture 95% unmute cap \
608     >/dev/null 2>&1
609     fi
610     done
611     fi
612 wolf31o2 15 fi
613 wolf31o2 68 else
614 wolf31o2 86 ewarn "Skipping ALSA detection as requested on command line ..."
615 wolf31o2 6 fi
616 zhen 2
617 wolf31o2 114 [ -n "${XDESC}" ] && einfo "VideoCard: ${HILITE}${XDESC}${NORMAL}"
618    
619 wolf31o2 102 if [ "${X11}" = "yes" ]
620 wolf31o2 76 then
621 wolf31o2 115 if [ -x /etc/init.d/mkxf86config ]
622     then
623     start_service mkxf86config
624     fi
625 wolf31o2 109 if [ -x /etc/init.d/x-setup ]
626     then
627     start_service x-setup
628     fi
629 wolf31o2 102 else
630     touch /etc/init.d/.noxdm
631 wolf31o2 76 fi
632    
633 wolf31o2 6 killall hwsetup 2>/dev/null
634     echo "6" > /proc/sys/kernel/printk
635 zhen 2 }
636 wolf31o2 6
637     # vim: ts=4

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20