slitaz-arm view rootfs/etc/init.d/rcS @ rev 29

Tiny edits
author Paul Issott <paul@slitaz.org>
date Mon Mar 03 16:32:33 2014 +0000 (2014-03-03)
parents 15f4a6497b20
children b2a49be1fc53
line source
1 #!/bin/sh
2 #
3 # /etc/init.d/rcS : Initial boot script for SliTaz ARM
4 # Config file is : /etc/rcS.conf
5 #
6 # rcS is the main initialization script used to check fs, mount, clean,
7 # run scripts and start daemons. This is a custom script for ARM to get
8 # a faster boot under Qemu and skip things like handling cdrom.
9 #
10 # Copyright (C) 2012 SliTaz ARM - BSD License
11 #
12 . /lib/libtaz.sh
13 . /etc/rcS.conf
15 # Set default path
16 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
18 echo $(colorize 34 "Processing: /etc/init.d/rcS")
20 # Mount /proc
21 echo -n "Mounting proc filesystem on: /proc"
22 mount proc
23 status
25 # Mount /run as tmpfs so runtime data are not written to disk
26 echo -n "Mounting tmpfs filesystem on: /run"
27 mount -t tmpfs tmpfs /run
28 status
30 # Mount all from: /etc/fstab
31 echo "Mounting filesystems in fstab..."
32 mount -a
34 # Populate /dev
35 echo -n "Creating device nodes..."
36 mdev -s
37 echo "/sbin/mdev" > /proc/sys/kernel/hotplug
38 status
40 # Be quiet
41 echo "0 0 0 0" > /proc/sys/kernel/printk
43 # Clean up
44 echo -n "Cleaning up the system..."
45 rm -rf /tmp /var/run && ln -s /run /var/run
46 mkdir /tmp && chmod 1777 /tmp
47 status
49 # Start syslogd and klogd.
50 echo -n "Starting system log daemons: syslogd/klogd..."
51 syslogd -s $SYSLOGD_SIZE && klogd
52 status
54 # Load all modules from config file
55 if [ "$LOAD_MODULES" ]; then
56 colorize 33 "Loading Kernel modules..."
57 for mod in $LOAD_MODULES; do
58 modprobe -v $mod
59 done
60 fi
62 # Start all init scripts
63 for script in $RUN_SCRIPTS; do
64 echo $(colorize 34 "Processing: /etc/init.d/$script")
65 /etc/init.d/$script
66 done
68 # Start all daemons
69 if [ "$RUN_DAEMONS" ]; then
70 colorize 33 "Starting all daemons..."
71 for daemon in $RUN_DAEMONS; do
72 /etc/init.d/$daemon start
73 done
74 fi
76 # System time
77 if fgrep -q 'rdate' /proc/cmdline; then
78 echo -n "Setting system date..."
79 rdate -s 203.129.68.14 2>/dev/null
80 status
81 fi
83 newline
84 colorize 32 "$MESSAGE"
86 # Back to a verbose mode.
87 echo "7 4 1 7" > /proc/sys/kernel/printk