summaryrefslogtreecommitdiff
blob: d52266f8e7bf464304d8b301908490994721474a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo/src/livecd/profiles/kde/aux-files/Attic/autoconfig,v 1.1 2003/10/19 03:10:54 livewire Exp $
echo "0" > /proc/sys/kernel/printk
DHCP="yes"
DETECT="yes"
PCMCIA="no"
HOTPLUG="yes"
APM="no"
ACPI="no"
CMDLINE="`cat /proc/cmdline`"
for x in $CMDLINE
do
        if [ "$x" = "nodetect" ]
        then
                DETECT="no"
		HOTPLUG="no"
		APM="no"
		ACPI="no"
        fi
done
for x in $CMDLINE
do
        if [ "$x" = "nodhcp" ]
        then
                DHCP="no"
        fi
done
for x in $CMDLINE
do
        if [ "$x" = "dopcmcia" ]
        then
                PCMCIA="yes"
        fi
done
for x in $CMDLINE
do
        if [ "$x" = "nohotplug" ]
        then
                HOTPLUG="no"
        fi
done
for x in $CMDLINE
do
        if [ "$x" = "noapm" ]
        then
                APM="no"
        fi
done

for x in $CMDLINE
do
        if [ "$x" = "acpi=on" ]
        then
                APM="no"
		ACPI="yes"
        fi
done


depend() {
	after *
}

start() {
if [ "$DETECT" = "yes" ]
	then
		ebegin $WARN"Hardware detection started"
	PC=`awk -F: '/^processor/{printf "Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>/dev/null`
		ebegin $GOOD"$PC"
		eend		
		hwsetup -p >/dev/null
		eend
		else
		ebegin $WARN"Hardware detection disabled via cmdline$NORMAL"
fi

if [ "$APM" = "no" ]
	then
        ebegin $GOOD"Not Loading APM Bios support.${NORMAL}"
	else
	insmod apm power_off=1 >/dev/null 2>&1 && ebegin $GOOD"APM BIOS found, power management functions enabled.$NORMAL"
	/etc/init.d/apmd start
	eend
fi


if [ "$ACPI" = "yes" ]
        then
        insmod processor >/dev/null 2>&1 && ebegin $GOOD ACPI power management functions enabled.$NORMAL
        insmod fan >/dev/null
	insmod thermal >/dev/null
	insmod button >/dev/null
	insmod battery >/dev/null
	insmod ac >/dev/null
	/etc/init.d/acpid start
	eend
fi

if [ "$PCMCIA" = "yes" ]
	then
	ebegin $HILITE "PCMCIA enabled via cmdline"
	/etc/init.d/pcmcia start
fi

if [ "$DHCP" = "no" ]
        then
	sed 's/iface_eth0="dhcp"/#iface_eth0="dhcp"/' /etc/conf.d/net > /etc/conf.d/net1
	cp /etc/conf.d/net1 /etc/conf.d/net
	rm /etc/conf.d/net1
	ebegin $BAD"Skipping DHCP broadcast detection as requested on boot commandline."
fi

	 #Read in what hwsetup has found
[ -f /etc/sysconfig/knoppix ] && . /etc/sysconfig/knoppix

# Mouse
if [ -n "$MOUSE_DEVICE" ]
	then
	ebegin $GOOD"Mouse is $HILITE$MOUSE_FULLNAME$GOOD at $HILITE$MOUSE_DEVICE$NORMAL"
	eend
fi

if [ "$HOTPLUG" = "yes" ]
	then
	/etc/init.d/hotplug start
	else
	ebegin $BAD"Hotplug disabled via cmdline$NORMAL"
fi

if [ "$DETECT" = "no" ]
        then
	DHCP="no"

fi

if [ "$DETECT" = "yes" ]
	then
	NETDEVICES="`awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null`"
fi

if [ -n "$NETDEVICES" ]
      	then
	ebegin $GOOD"Network device$HILITE$NETDEVICES$GOOD detected,$WARN DHCP broadcasting for IP.$NORMAL"
	eend
	else
	ebegin $BAD"No Network device auto detected.$NORMAL"

fi


if [ -n "$SOUND_FULLNAME" -o -n "$SOUND_DRIVER" ]
	then
	# Setting micro input to zero to avoid subsonic disaster
	ebegin $GOOD"Soundcard:"
	eend
	aumix -m 0 >/dev/null 2>&1
	aumix -f /etc/aumixrc -L >/dev/null 2>&1
	aumix -v75 -c75 -w75 >/dev/null 2>&1
#	modprobe /dev/dsp
	[ -n "$SOUND_FULLNAME" ] 
	ebegin "              $WARN$SOUND_FULLNAME"
	[ -n "$SOUND_DRIVER" ] 
	ebegin $WARN"              driver = $SOUND_DRIVER"$HILITE
fi


if [ -n "$XDESC" -o -n "$XDESC" ]
        then
        ebegin $GOOD"VideoCard:   $WARN ${XDESC}"
        eend
fi


killall hwsetup 2>/dev/null
test -f /proc/splash && echo "show 65535" > /proc/splash
echo "6" > /proc/sys/kernel/printk
sleep 1
echo off >/proc/splash
clear
}