/[livecd-tools]/trunk/autoconfig
Gentoo

Diff of /trunk/autoconfig

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

Revision 137 Revision 138
1#!/sbin/runscript 1#!/sbin/runscript
2 2
3ACPI="no"
4ALSA="yes"
5APM="no"
6DETECT="yes"
3DHCP="yes" 7DHCP="yes"
4DETECT="yes"
5GPM="yes" 8GPM="yes"
6PCMCIA="no"
7HOTPLUG="yes" 9HOTPLUG="yes"
8APM="no"
9ACPI="no"
10IDEDMA="yes" 10IDEDMA="yes"
11ALSA="yes" 11NFS="yes"
12PCMCIA="yes"
13SSHD="no"
12X11="yes" 14X11="yes"
13 15
14get_config() { 16get_config() {
15 CMDLINE="$(cat /proc/cmdline)" 17 CMDLINE="$(cat /proc/cmdline)"
16 18
17 for x in ${CMDLINE} ; do 19 for x in ${CMDLINE} ; do
18 case "${x}" in 20 case "${x}" in
19 nodetect) 21 nodetect)
22 ACPI="no"
23 ALSA="no"
24 APM="no"
20 DETECT="no" 25 DETECT="no"
21 GPM="no" 26 GPM="no"
22 HOTPLUG="no" 27 HOTPLUG="no"
23 APM="no"
24 ACPI="no"
25 ALSA="no" 28 NFS="no"
26 X11="no" 29 X11="no"
27 ;; 30 ;;
28 nodhcp) 31 nodhcp)
29 DHCP="no" 32 DHCP="no"
30 ;; 33 ;;
33 ;; 36 ;;
34 dopcmcia) 37 dopcmcia)
35 PCMCIA="yes" 38 PCMCIA="yes"
36 ;; 39 ;;
37 doapm) 40 doapm)
41 ACPI="no"
38 APM="yes" 42 APM="yes"
39 ACPI="no"
40 ;; 43 ;;
41 acpi\=on|acpi\=force) 44 acpi\=on|acpi\=force)
45 ACPI="yes"
42 APM="no" 46 APM="no"
43 ACPI="yes"
44 ;; 47 ;;
45 ide\=nodma) 48 ide\=nodma)
46 IDEDMA="no" 49 IDEDMA="no"
47 ;; 50 ;;
48 nohotplug) 51 nohotplug)
49 HOTPLUG="no" 52 HOTPLUG="no"
50 ;; 53 ;;
51 nosound) 54 nosound)
52 ALSA="no" 55 ALSA="no"
56 ;;
57 nonfs)
58 NFS="no"
59 ;;
60 dosshd)
61 SSHD="yes"
53 ;; 62 ;;
54 nox) 63 nox)
55 X11="no" 64 X11="no"
56 ;; 65 ;;
57 esac 66 esac
88 svcs="${svcs} $(check_svc ${IDEDMA} hdparm)" 97 svcs="${svcs} $(check_svc ${IDEDMA} hdparm)"
89 svcs="${svcs} $(check_svc ${PCMCIA} pcmcia)" 98 svcs="${svcs} $(check_svc ${PCMCIA} pcmcia)"
90 svcs="${svcs} $(check_svc ${GPM} gpm)" 99 svcs="${svcs} $(check_svc ${GPM} gpm)"
91 svcs="${svcs} $(check_svc ${HOTPLUG} coldplug hotplug)" 100 svcs="${svcs} $(check_svc ${HOTPLUG} coldplug hotplug)"
92 svcs="${svcs} $(check_svc ${ALSA} alsasound)" 101 svcs="${svcs} $(check_svc ${ALSA} alsasound)"
102 svcs="${svcs} $(check_svc ${NFS} nfsmount)"
103 svcs="${svcs} $(check_svc ${SSH} sshd)"
93 svcs="${svcs} $(check_svc ${X11} mkxf86config x-setup)" 104 svcs="${svcs} $(check_svc ${X11} mkxf86config x-setup)"
94 105
95 echo ${svcs} 106 echo ${svcs}
96} 107}
97 108
229 # services for the installer. 240 # services for the installer.
230 sed -i 's/RC_COLDPLUG="no"/RC_COLDPLUG="yes"/' /etc/conf.d/rc 241 sed -i 's/RC_COLDPLUG="no"/RC_COLDPLUG="yes"/' /etc/conf.d/rc
231 # Now, we check if we're supposed to run a coldplug script. 242 # Now, we check if we're supposed to run a coldplug script.
232 if [ "${HOTPLUG}" = "yes" ] 243 if [ "${HOTPLUG}" = "yes" ]
233 then 244 then
234 # Check whether we should be using hotplug or coldplug 245 # Check whether we should be using hotplug/coldplug or whether we should
246 # just let udev do it all.
235 if [ -x /etc/init.d/coldplug ] 247 if [ -x /etc/init.d/coldplug ]
236 then 248 then
237 start_service coldplug 249 start_service coldplug
238 elif [ -x /etc/init.d/hotplug ] 250 elif [ -x /etc/init.d/hotplug ]
239 then 251 then
321 fi 333 fi
322 334
323 if [ "${IDEDMA}" = "yes" ] 335 if [ "${IDEDMA}" = "yes" ]
324 then 336 then
325 [ -x /etc/init.d/hdparm ] && start_service hdparm 337 [ -x /etc/init.d/hdparm ] && start_service hdparm
338 else
339 ewarn "Disabling IDE DMA support ..."
326 fi 340 fi
327 341
328 if [ "${PCMCIA}" = "yes" ] 342 if [ "${PCMCIA}" = "yes" ]
329 then 343 then
330 einfo "PCMCIA enabled via cmdline ..."
331 [ -x /etc/init.d/pcmcia ] && start_service pcmcia 344 [ -x /etc/init.d/pcmcia ] && start_service pcmcia
345 else
346 ewarn "PCMCIA disabled via cmdline ..."
332 fi 347 fi
333 348
334 if [ "${DHCP}" = "no" ] 349 if [ "${DHCP}" = "no" ]
335 then 350 then
336 sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \ 351 sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
339 /etc/conf.d/net 354 /etc/conf.d/net
340 for i in `seq 0 4` 355 for i in `seq 0 4`
341 do 356 do
342 echo "config_eth$i=( \"none\" )" >> /etc/conf.d/net 357 echo "config_eth$i=( \"none\" )" >> /etc/conf.d/net
343 done 358 done
344 ewarn "Skipping DHCP broadcast detection as requested on boot commandline ..." 359 ewarn "Skipping DHCP broadcast ..."
345 fi 360 fi
346 361
347 # Read in what hwsetup has found 362 # Read in what hwsetup has found
348 [ -f /etc/sysconfig/gentoo ] && . /etc/sysconfig/gentoo 363 [ -f /etc/sysconfig/gentoo ] && . /etc/sysconfig/gentoo
349 364
395 dhcpcd -n -h $(hostname) ${nics} 410 dhcpcd -n -h $(hostname) ${nics}
396 fi 411 fi
397 fi 412 fi
398 fi 413 fi
399 done 414 done
415 [ "${NFS}" = "yes" ] \
416 && [ -x /etc/init.d/nfsmount ] && start_service nfsmount
417 if [ "${SSHD}" = "yes" ]
418 then
419 # TODO: need to add a password check/warning here
420 [ -x /etc/init.d/sshd ] && start_service sshd
421 fi
400 else 422 else
401 ewarn "No Network device auto detected ..." 423 ewarn "No Network device auto detected ..."
402 fi 424 fi
403 425
404 if [ "${ALSA}" = "yes" ] 426 if [ "${ALSA}" = "yes" ]

Legend:
Removed from v.137  
changed lines
  Added in v.138

  ViewVC Help
Powered by ViewVC 1.1.20