aboutsummaryrefslogtreecommitdiffstats
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)
downloadopenembedded-core-contrib-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 @@
+### BEGIN INIT INFO
+# Provides: bootmisc
+# Required-Start: $local_fs mountvirtfs
+# Required-Stop: $local_fs
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Misc and other.
+### END INIT INFO
+
+. /etc/default/rcS
+#
+# Put a nologin file in /etc to prevent people from logging in before
+# system startup is complete.
+#
+if test "$DELAYLOGIN" = yes
+then
+ echo "System bootup in progress - please wait" > /etc/nologin
+ cp /etc/nologin /etc/nologin.boot
+fi
+
+#
+# Set pseudo-terminal access permissions.
+#
+if test -c /dev/ttyp0
+then
+ chmod 666 /dev/tty[p-za-e][0-9a-f]
+ chown root:tty /dev/tty[p-za-e][0-9a-f]
+fi
+
+#
+# Apply /proc settings if defined
+#
+SYSCTL_CONF="/etc/sysctl.conf"
+if [ -f "${SYSCTL_CONF}" ]
+then
+ if [ -x "/sbin/sysctl" ]
+ then
+ /sbin/sysctl -p "${SYSCTL_CONF}"
+ else
+ echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
+ fi
+fi
+
+#
+# Update /etc/motd.
+#
+if test "$EDITMOTD" != no
+then
+ uname -a > /etc/motd.tmp
+ sed 1d /etc/motd >> /etc/motd.tmp
+ mv /etc/motd.tmp /etc/motd
+fi
+
+#
+# This is as good a place as any for a sanity check
+# /tmp should be a symlink to /var/tmp to cut down on the number
+# of mounted ramdisks.
+if test ! -L /tmp && test -d /var/tmp
+then
+ rm -rf /tmp
+ ln -sf /var/tmp /tmp
+fi
+
+# Set the system clock from hardware clock
+# If the timestamp is 1 day or more recent than the current time,
+# use the timestamp instead.
+/etc/init.d/hwclock.sh start
+if test -e /etc/timestamp2
+then
+ SYSTEMDATE=`date "+%Y%m%d%2H%2M"`
+ read TIMESTAMP < /etc/timestamp2
+ NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
+ if [ $NEEDUPDATE -eq 1 ]; then
+ date $TIMESTAMP
+ /etc/init.d/hwclock.sh stop
+ fi
+fi
+: exit 0