source: clfs-embedded/bootscripts/clfs/rc.d/startup@ 89cc05c

Last change on this file since 89cc05c was aea05b2, checked in by Jim Gifford <clfs@…>, 18 years ago

Update bootscripts

  • Property mode set to 100755
File size: 1.7 KB
RevLine 
[a44b91b]1#!/bin/ash
2
3# System Startup Script
4#
5. /etc/rc.d/init.d/functions
6
[aea05b2]7/bin/mount -t proc none /proc
[ae024d6]8/bin/mount -t sysfs none /sys
[aea05b2]9/bin/mount -t tmpfs -o mode=0755 none /dev
[c25b963]10/bin/mkdir /dev/pts
11/bin/mkdir /dev/shm
[9c1d1fa]12/bin/echo "/sbin/mdev" > /proc/sys/kernel/hotplug
[ae024d6]13/sbin/mdev -s
14
[a44b91b]15echo -n "Setting system clock: "
16hwclock --hctosys --utc
17check_status
18
19echo "Starting fsck for root filesystem."
20fsck -T -C /
21if [ "$?" -gt 2 ]; then
22 echo "WARNING: Errors found while checking root filesystem."
23 echo "You can login as root now, the system will reboot after logout."
24 sulogin
25 reboot
26elif [ "$?" = "2" ]; then
27 echo "NOTICE: System needs to be rebooted now."
28 sleep 1
29 reboot
30else
31 echo -n "Checking root filesystem: "
32 check_status
33fi
34
35echo -n "Remounting root rw: "
36mount -o remount,rw /
37check_status
38
39echo -n "Mounting devpts: "
40mount /dev/pts
41check_status
42
43echo "Starting fsck for local filesystems."
44fsck -A -C -R -T -t nonfs,nosmbfs
45if [ "$?" -gt 2 ]; then
46 echo "WARNING: Errors found while checking filesystems."
47 echo "You can login as root now, the system will reboot after logout."
48 sulogin
49 reboot
50elif [ "$?" = "2" ]; then
51 echo "NOTICE: System needs to be rebooted now."
52 sleep 1
53 reboot
54else
55 echo -n "Checking local filesystems: "
56 check_status
57fi
58
59echo -n "Enabling swap space: "
60swapon -a
61check_status
62
63echo -n "Setting hostname: "
64hostname -F /etc/HOSTNAME
65check_status
66
67echo -n "Cleaning up system: "
68> /var/run/utmp
69touch /var/log/wtmp
70touch /var/log/messages
71chmod 0664 /var/run/utmp
72chmod 0664 /var/log/wtmp
73chmod 0660 /var/log/messages
74rm -rf /tmp/*
75rm -f /var/run/*.pid
76check_status
77
78echo -n "Setting up interface lo: "
79ifconfig lo up 127.0.0.1
80check_status
81
[b9cef84]82echo "Running start scripts."
[a44b91b]83
84for i in /etc/rc.d/start/*
85do
86 if [ -x $i ]; then
87 $i start
88 fi
89done
Note: See TracBrowser for help on using the repository browser.