From 4b46c1f6e891b1ddd5968536440b888661fade3e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 31 Aug 2005 10:45:47 +0000 Subject: Initial population git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../initscripts/initscripts-1.0/bootmisc.sh | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 openembedded/packages/initscripts/initscripts-1.0/bootmisc.sh (limited to 'openembedded/packages/initscripts/initscripts-1.0/bootmisc.sh') diff --git a/openembedded/packages/initscripts/initscripts-1.0/bootmisc.sh b/openembedded/packages/initscripts/initscripts-1.0/bootmisc.sh new file mode 100755 index 000000000..814dba676 --- /dev/null +++ b/openembedded/packages/initscripts/initscripts-1.0/bootmisc.sh @@ -0,0 +1,71 @@ +# +# 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 ." + 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 +# +/sbin/ldconfig + +# +# Recover the time, if there is a time file +# +if test -e /etc/timestamp +then + date -s `cat /etc/timestamp` +fi +: exit 0 -- cgit v1.2.3