source: clfs-embedded/bootscripts/clfs/rc.d/startup@ 67b70f4

Last change on this file since 67b70f4 was 1933be2, checked in by Maarten Lankhorst <mlankhorst@…>, 15 years ago

bootscripts: Updates, and add a network bridge startup file

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