]> git.ipfire.org Git - ipfire-2.x.git/blob - src/rc.d/rc.sysinit
MONSTER-REVISION!
[ipfire-2.x.git] / src / rc.d / rc.sysinit
1 #!/bin/sh
2 #
3 # rc.sysinit by the IPFire Team
4 #
5
6 eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
7
8 umask 022
9
10 PATH=/bin:/sbin:/usr/bin:/usr/sbin
11 export PATH
12
13 PROGRESS=0
14 NUMBEROFSCRIPTS=`ls -l /etc/boot.d | grep ^- | wc -l`
15 progressbar()
16 {
17 if [ $# != 1 ]
18 then
19 echo "Usage: progressbar {progress}"
20 exit 1
21 fi
22 if [ -e /proc/splash ]; then
23 echo "show $(( 65534 * $1 / $NUMBEROFSCRIPTS ))" > /proc/splash
24 fi
25 }
26
27 echo "Mounting /proc filesystem"
28 mount -n -t proc /proc /proc
29
30 progressbar 0
31
32 list=`find /etc/boot.d -type f -maxdepth 1 | sort`
33 for script in $list; do
34 . $script
35 let PROGRESS=$PROGRESS+1
36 progressbar $PROGRESS
37 done
38
39 logger -t ipfire "IPFire started."
40
41 # Send nice startup beep now
42 /usr/bin/beep -l 75 -f 500
43 /usr/bin/beep -l 75 -f 1000
44 /usr/bin/beep -l 75 -f 2000
45 /usr/bin/beep -l 75 -f 3000
46