Subversion Repositories livecd

Rev

Rev 75 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 75 Rev 81
Line 32... Line 32...
32
GATEWAY=$( cmdline_value gw )
32
GATEWAY=$( cmdline_value gw )
33
 
33
 
34
# netmask
34
# netmask
35
NETMASK=$( cmdline_value netmask )
35
NETMASK=$( cmdline_value netmask )
36
 
36
 
-
 
37
# start WLAN network on boot
-
 
38
WLAN=$( cmdline_parameter wlan )
-
 
39
 
-
 
40
# do not apply any fixes (for debugging)
-
 
41
NOFIX=$( cmdline_parameter nofix )
-
 
42
 
-
 
43
 
37
 
44
 
38
### -----------------------------------------------------------
45
### -----------------------------------------------------------
39
### Main
46
### Main
40
### -----------------------------------------------------------
47
### -----------------------------------------------------------
41
 
48
 
42
### run kudzu in quiet mode
49
### run kudzu in quiet mode
43
action $"Hardware auto-detection, please wait... " /usr/sbin/kudzu -q
50
action $"Hardware auto-detection, please wait... " /usr/sbin/kudzu -q
44
 
51
 
45
 
52
 
46
### never start on boot the following network devices (wifi0, ath0)
53
### never start on boot the following network devices (wifi0)
-
 
54
if [ ! $NOFIX ]; then
47
for iface in wifi0 ath0; do
55
    for iface in wifi0; do
48
    for file in networking/profiles/default/ifcfg \
56
	for file in networking/profiles/default/ifcfg \
49
	networking/devices/ifcfg \
57
	    networking/devices/ifcfg \
50
	network-scripts/ifcfg; do
58
	    network-scripts/ifcfg; do
51
      if [ -e /etc/sysconfig/${file}-${iface} ]; then
59
	  if [ -e /etc/sysconfig/${file}-${iface} ]; then
52
	  sed -i "s/ONBOOT=.*/ONBOOT=no/" /etc/sysconfig/${file}-${iface}
60
	      sed -i "s/ONBOOT=.*/ONBOOT=no/" /etc/sysconfig/${file}-${iface}
53
      fi
61
	  fi
-
 
62
	done
54
    done
63
    done
55
done
64
fi
56
 
65
 
57
 
66
 
58
### disable start network devices, if NONET is defined
67
### do not start network devices, if NONET is defined
59
if [ $NONET ]; then
68
if [ $NONET ]; then
60
    # find all network devices (exclude loopback device)
69
    # find all network devices (exclude loopback device)
61
    config_files=$( find /etc/sysconfig -name ifcfg-* 2>/dev/null | grep -v ifcfg-lo )
70
    config_files=$( find /etc/sysconfig -name ifcfg-* 2>/dev/null | grep -v ifcfg-lo )
62
    for file in $config_files; do
71
    for file in $config_files; do
63
	sed -i "s/ONBOOT=.*/ONBOOT=no/" $file
72
	sed -i "s/ONBOOT=.*/ONBOOT=no/" $file
Line 96... Line 105...
96
### activate Atheros WLAN
105
### activate Atheros WLAN
97
lspci | grep -q Ethernet.*Atheros
106
lspci | grep -q Ethernet.*Atheros
98
if [ "$?" = "0" ]; then
107
if [ "$?" = "0" ]; then
99
    # bring ath0 up
108
    # bring ath0 up
100
    ifconfig ath0 up > /dev/null 2>&1
109
    ifconfig ath0 up > /dev/null 2>&1
101
    # replace wifi with ath0
110
    # replace wifi0 with ath0
102
    for file in networking/profiles/default/ifcfg \
111
    for file in networking/profiles/default/ifcfg \
103
	networking/devices/ifcfg \
112
	networking/devices/ifcfg \
104
	network-scripts/ifcfg; do
113
	network-scripts/ifcfg; do
105
      if [ -e /etc/sysconfig/${file}-wifi0 ]; then
114
      if [ -e /etc/sysconfig/${file}-wifi0 ]; then
106
	  mv /etc/sysconfig/${file}-wifi0 /etc/sysconfig/${file}-ath0
115
	  mv /etc/sysconfig/${file}-wifi0 /etc/sysconfig/${file}-ath0
Line 110... Line 119...
110
      fi
119
      fi
111
    done
120
    done
112
fi
121
fi
113
 
122
 
114
 
123
 
-
 
124
### do not start WLAN devices on boot
-
 
125
if [ ! $WLAN ]; then
-
 
126
    # find all network devices (exclude loopback device)
-
 
127
    config_files=$( find /etc/sysconfig -name ifcfg-* 2>/dev/null | grep -v ifcfg-lo )
-
 
128
    for file in $config_files; do
-
 
129
	# WLAN device?
-
 
130
	grep -q TYPE=Wireless $file
-
 
131
        if [ "$?" = "0" ]; then
-
 
132
	    sed -i "s/ONBOOT=.*/ONBOOT=no/" $file
-
 
133
	fi
-
 
134
    done
-
 
135
fi
-
 
136
    
-
 
137
 
115
### enable 915resolution on Intel Mobile Display controller
138
### enable 915resolution on Intel Mobile Display controller
116
lspci | grep -q Display.*Intel.*Mobile
139
lspci | grep -q Display.*Intel.*Mobile
117
[ "$?" = "0" ] && chkconfig 915resolution on
140
[ "$?" = "0" ] && chkconfig 915resolution on
118
 
141