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

sync date in rcS
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 26 12:10:08 2012 +0200 (2012-05-26)
parents efe1212fa6af
children 68f82e46d19b
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 # fast 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 # We still have busybox searching for .so file in /usr/cross/arm but after
16 # initialization all is fine. Use a static busybox build and have mdev ???
17 PATH=/bin:/sbin:/usr/bin:/usr/sbin
18 LD_LIBRARY_PATH=/usr/lib:/lib
19 export PATH LD_LIBRARY_PATH
21 echo $(colorize 34 "Processing:") "/etc/init.d/rcS"
23 # Mount /proc
24 echo -n "Mounting proc filesystem..."
25 mount proc
26 status
28 # Populate /dev
29 #mdev -s
30 #echo "/sbin/mdev" > /proc/sys/kernel/hotplug
32 # Mount all from: /etc/fstab
33 echo "Mounting filesystems in fstab..."
34 mount -a
36 # Be quiet
37 echo "0 0 0 0" > /proc/sys/kernel/printk
39 # Clean up
40 echo -n "Cleaning up the system..."
41 find /var/run -name "*.pid" -type f | xargs /bin/rm -f
42 rm -rf /tmp && mkdir /tmp && chmod 1777 /tmp
43 status
45 # Start syslogd and klogd.
46 echo -n "Starting system log deamons: syslogd/klogd..."
47 syslogd -s $SYSLOGD_SIZE && klogd
48 status
50 # Load all modules from config file
51 if [ "$LOAD_MODULES" ]; then
52 colorize 33 "Loading Kernel modules..."
53 for mod in $LOAD_MODULES; do
54 modprobe -v $mod
55 done
56 fi
58 # Start all init scripts
59 for script in $RUN_SCRIPTS; do
60 echo $(colorize 34 "Processing:") "/etc/init.d/$script"
61 /etc/init.d/$script
62 done
64 # Start all daemons
65 if [ "$RUN_DAEMONS" ]; then
66 colorize 33 "Starting all daemons..."
67 for daemon in $RUN_DAEMONS; do
68 /etc/init.d/$daemon start
69 done
70 fi
72 # System time
73 rdate -s 203.129.68.14
75 #Attemp to fix root login
76 echo -e "root\nroot\n" | passwd root
78 newline
79 colorize 32 "$MESSAGE"
80 newline
82 # Back to a verbose mode.
83 echo "7 4 1 7" > /proc/sys/kernel/printk