Subversion Repositories livecd

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 beyerle@PS 1
#!/bin/bash
2
#
3
# Noninteractive HW detection and configuration
4
#
5
# Urs Beyerle, PSI
6
#
7
 
8
### -----------------------------------------------------------
9
### definitions
10
### -----------------------------------------------------------
11
 
12
# dir of mounted /$MOUNTDIR/live
13
MOUNTDIR=livecd
14
 
15
# source functions
16
. /$MOUNTDIR/live/liblinuxlive
17
. /etc/init.d/functions
18
 
19
 
20
### -----------------------------------------------------------
21
### Get boot parameters
22
### -----------------------------------------------------------
23
 
24
# do not start network
25
NONET=$( cmdline_parameter nonet )
26
 
27
 
28
### -----------------------------------------------------------
29
### Main
30
### -----------------------------------------------------------
31
 
32
# run kudzu in quiet mode
33
action $"Hardware auto-detection, please wait... " /usr/sbin/kudzu -q
34
 
35
# disable start network devices, if NONET is defined
36
if [ $NONET ]; then
37
    for iface in eth0 eth1 eth2 eth3; do
38
        for file in networking/profiles/default/ifcfg \
39
                    networking/devices/ifcfg \
40
                    network-scripts/ifcfg; do
41
	  if [ -e /etc/sysconfig/${file}-${iface} ]; then
42
	      sed -i "s/ONBOOT=.*/ONBOOT=no/" /etc/sysconfig/${file}-${iface}
43
	  fi
44
        done
45
    done
46
fi
47