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

Last change on this file since d3398c8 was d3398c8, checked in by Andrew Bradford <andrew@…>, 11 years ago

startup: Don't mount tmpfs on /dev

That's what DEVTMPFS is for and it's done automatically.

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