aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/initscripts/initscripts-1.0/bootmisc.sh
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/initscripts/initscripts-1.0/bootmisc.sh
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/initscripts/initscripts-1.0/bootmisc.sh')
-rwxr-xr-xrecipes/initscripts/initscripts-1.0/bootmisc.sh80
1 files changed, 80 insertions, 0 deletions
diff --git a/recipes/initscripts/initscripts-1.0/bootmisc.sh b/recipes/initscripts/initscripts-1.0/bootmisc.sh
new file mode 100755
index 0000000000..dde1209be5
--- /dev/null
+++ b/recipes/initscripts/initscripts-1.0/bootmisc.sh
@@ -0,0 +1,80 @@
+#
+# bootmisc.sh Miscellaneous things to be done during bootup.
+#
+
+. /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 ( ! grep -q devfs /proc/mounts ) && 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
+
+#
+# Update dynamic library cache, but only if ld.so.conf is present
+#
+if [ -e /etc/ld.so.conf ] ; then
+ /sbin/ldconfig
+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/timestamp
+then
+ SYSTEMDATE=`date "+%Y%m%d"`
+ TIMESTAMP=`cat /etc/timestamp | awk '{ print substr($0,9,4) substr($0,1,4);}'`
+ NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE \)`
+ if [ $NEEDUPDATE -eq 1 ]; then
+ date `cat /etc/timestamp`
+ /etc/init.d/hwclock.sh stop
+ fi
+fi
+: exit 0