]>
git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - config/install/rc
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
24 HOSTNAME
=ipfire.localdomain
28 boot_mesg
-n "Mounting kernel-based file systems:" ${INFO}
30 boot_mesg
-n " /proc" ${NORMAL}
31 mount
-n -t proc proc
/proc || failed
=1
33 boot_mesg
-n " /sys" ${NORMAL}
34 mount
-n -t sysfs sysfs
/sys || failed
=1
36 boot_mesg
"" ${NORMAL}
42 boot_mesg
"Silencing kernel..."
43 echo >/proc
/sys
/kernel
/printk
"1 4 1 7"
47 boot_mesg
"Disabling screen blanking..."
48 echo -n -e "\033[9;0]"
52 boot_mesg
"Mounting /dev"
53 mount
-n -t tmpfs tmpfs
/dev
-o mode
=755
56 boot_mesg
"Populating /dev with device nodes..."
57 echo > /proc
/sys
/kernel
/hotplug
59 cp -a /lib
/udev
/devices
/* /dev
66 boot_mesg
"Bringing up the loopback interface..."
67 ip addr add
127.0.0.1/8 label lo dev lo
72 boot_mesg
"Setting hostname to ${HOSTNAME}..."
77 # Now check what mode= was passed to the kernel
78 for i
in $
(cat /proc
/cmdline
); do
81 STARTUP_MODE
=${i#mode=}
88 SYSLOGD_EXTRA
="-O /root/install.log"
90 boot_mesg
"Detecting hardware..."
91 for MODULE
in $
(kudzu
-qps -t 30 |
grep driver
: | cut
-d ' ' -f 2 |
sort |
uniq); do
92 if [ "$MODULE" = "unknown" ] || \
93 [ "$MODULE" = "ignore" ] || \
94 [ "$MODULE" = "" ]; then
97 MODULE
=$
(find /lib
/modules
-name $
(echo $MODULE |
sed -e 's/[_-]/*/g')* 2>/dev
/null
)
98 [ "$MODULE" == "" ] && continue
99 MODULE
=$
(basename $MODULE | cut
-d.
-f1 |
head -1)
101 if grep -Eqe "^$MODULE " /proc
/modules
; then
105 echo "$MODULE" >> /tmp
/modules-found.txt
112 sed -i "s, -c /bin/installer,,g" /etc
/inittab
117 boot_mesg
"Starting system log daemon..."
118 syslogd
-O /dev
/tty4
$SYSLOGD_EXTRA