summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh78
1 files changed, 78 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..bd11f9a2fc
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -0,0 +1,78 @@
1### BEGIN INIT INFO
2# Provides: bootmisc
3# Required-Start: $local_fs mountvirtfs
4# Required-Stop: $local_fs
5# Default-Start: S
6# Default-Stop: 0 6
7# Short-Description: Misc and other.
8### END INIT INFO
9
10. /etc/default/rcS
11#
12# Put a nologin file in /etc to prevent people from logging in before
13# system startup is complete.
14#
15if test "$DELAYLOGIN" = yes
16then
17 echo "System bootup in progress - please wait" > /etc/nologin
18 cp /etc/nologin /etc/nologin.boot
19fi
20
21#
22# Set pseudo-terminal access permissions.
23#
24if test -c /dev/ttyp0
25then
26 chmod 666 /dev/tty[p-za-e][0-9a-f]
27 chown root:tty /dev/tty[p-za-e][0-9a-f]
28fi
29
30#
31# Apply /proc settings if defined
32#
33SYSCTL_CONF="/etc/sysctl.conf"
34if [ -f "${SYSCTL_CONF}" ]
35then
36 if [ -x "/sbin/sysctl" ]
37 then
38 /sbin/sysctl -p "${SYSCTL_CONF}"
39 else
40 echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
41 fi
42fi
43
44#
45# Update /etc/motd.
46#
47if test "$EDITMOTD" != no
48then
49 uname -a > /etc/motd.tmp
50 sed 1d /etc/motd >> /etc/motd.tmp
51 mv /etc/motd.tmp /etc/motd
52fi
53
54#
55# This is as good a place as any for a sanity check
56# /tmp should be a symlink to /var/tmp to cut down on the number
57# of mounted ramdisks.
58if test ! -L /tmp && test -d /var/tmp
59then
60 rm -rf /tmp
61 ln -sf /var/tmp /tmp
62fi
63
64# Set the system clock from hardware clock
65# If the timestamp is 1 day or more recent than the current time,
66# use the timestamp instead.
67/etc/init.d/hwclock.sh start
68if test -e /etc/timestamp2
69then
70 SYSTEMDATE=`date "+%Y%m%d%2H%2M"`
71 read TIMESTAMP < /etc/timestamp2
72 NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
73 if [ $NEEDUPDATE -eq 1 ]; then
74 date $TIMESTAMP
75 /etc/init.d/hwclock.sh stop
76 fi
77fi
78: exit 0