summaryrefslogtreecommitdiffstats
path: root/meta/packages/initscripts/initscripts-1.0/bootmisc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/bootmisc.sh')
-rwxr-xr-xmeta/packages/initscripts/initscripts-1.0/bootmisc.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/bootmisc.sh b/meta/packages/initscripts/initscripts-1.0/bootmisc.sh
new file mode 100755
index 0000000000..814dba676c
--- /dev/null
+++ b/meta/packages/initscripts/initscripts-1.0/bootmisc.sh
@@ -0,0 +1,71 @@
1#
2# bootmisc.sh Miscellaneous things to be done during bootup.
3#
4
5. /etc/default/rcS
6#
7# Put a nologin file in /etc to prevent people from logging in before
8# system startup is complete.
9#
10if test "$DELAYLOGIN" = yes
11then
12 echo "System bootup in progress - please wait" > /etc/nologin
13 cp /etc/nologin /etc/nologin.boot
14fi
15
16#
17# Set pseudo-terminal access permissions.
18#
19if ( ! grep -q devfs /proc/mounts ) && test -c /dev/ttyp0
20then
21 chmod 666 /dev/tty[p-za-e][0-9a-f]
22 chown root:tty /dev/tty[p-za-e][0-9a-f]
23fi
24
25#
26# Apply /proc settings if defined
27#
28SYSCTL_CONF="/etc/sysctl.conf"
29if [ -f "${SYSCTL_CONF}" ]
30then
31 if [ -x "/sbin/sysctl" ]
32 then
33 /sbin/sysctl -p "${SYSCTL_CONF}"
34 else
35 echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
36 fi
37fi
38
39#
40# Update /etc/motd.
41#
42if test "$EDITMOTD" != no
43then
44 uname -a > /etc/motd.tmp
45 sed 1d /etc/motd >> /etc/motd.tmp
46 mv /etc/motd.tmp /etc/motd
47fi
48
49#
50# This is as good a place as any for a sanity check
51# /tmp should be a symlink to /var/tmp to cut down on the number
52# of mounted ramdisks.
53if test ! -L /tmp && test -d /var/tmp
54then
55 rm -rf /tmp
56 ln -sf /var/tmp /tmp
57fi
58
59#
60# Update dynamic library cache
61#
62/sbin/ldconfig
63
64#
65# Recover the time, if there is a time file
66#
67if test -e /etc/timestamp
68then
69 date -s `cat /etc/timestamp`
70fi
71: exit 0