diff options
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh new file mode 100755 index 0000000000..3b5a47fcdd --- /dev/null +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: bootmisc | ||
4 | # Required-Start: $local_fs mountvirtfs | ||
5 | # Required-Stop: $local_fs | ||
6 | # Default-Start: S | ||
7 | # Default-Stop: 0 6 | ||
8 | # Short-Description: Misc and other. | ||
9 | ### END INIT INFO | ||
10 | |||
11 | . /etc/default/rcS | ||
12 | # | ||
13 | # Put a nologin file in /etc to prevent people from logging in before | ||
14 | # system startup is complete. | ||
15 | # | ||
16 | if test "$DELAYLOGIN" = yes | ||
17 | then | ||
18 | echo "System bootup in progress - please wait" > /etc/nologin | ||
19 | cp /etc/nologin /etc/nologin.boot | ||
20 | fi | ||
21 | |||
22 | # | ||
23 | # Set pseudo-terminal access permissions. | ||
24 | # | ||
25 | if test -c /dev/ttyp0 | ||
26 | then | ||
27 | chmod 666 /dev/tty[p-za-e][0-9a-f] | ||
28 | chown root:tty /dev/tty[p-za-e][0-9a-f] | ||
29 | fi | ||
30 | |||
31 | # | ||
32 | # Apply /proc settings if defined | ||
33 | # | ||
34 | SYSCTL_CONF="/etc/sysctl.conf" | ||
35 | if [ -f "${SYSCTL_CONF}" ] | ||
36 | then | ||
37 | if [ -x "/sbin/sysctl" ] | ||
38 | then | ||
39 | /sbin/sysctl -p "${SYSCTL_CONF}" | ||
40 | else | ||
41 | echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>." | ||
42 | fi | ||
43 | fi | ||
44 | |||
45 | # | ||
46 | # Update /etc/motd. | ||
47 | # | ||
48 | if test "$EDITMOTD" != no | ||
49 | then | ||
50 | uname -a > /etc/motd.tmp | ||
51 | sed 1d /etc/motd >> /etc/motd.tmp | ||
52 | mv /etc/motd.tmp /etc/motd | ||
53 | fi | ||
54 | |||
55 | # | ||
56 | # This is as good a place as any for a sanity check | ||
57 | # | ||
58 | # Set the system clock from hardware clock | ||
59 | # If the timestamp is more recent than the current time, | ||
60 | # use the timestamp instead. | ||
61 | test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start | ||
62 | if test -e /etc/timestamp | ||
63 | then | ||
64 | SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` | ||
65 | read TIMESTAMP < /etc/timestamp | ||
66 | if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then | ||
67 | date -u ${TIMESTAMP#????}${TIMESTAMP%????????} | ||
68 | test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop | ||
69 | fi | ||
70 | fi | ||
71 | : exit 0 | ||