Subversion Repositories livecd

Rev

Rev 1 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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