2012-01-23 09:02:06 +00:00
|
|
|
#!/bin/sh
|
2008-07-03 15:20:56 +00:00
|
|
|
### 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
|
2005-08-31 10:45:47 +00:00
|
|
|
|
|
|
|
. /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.
|
|
|
|
#
|
2008-07-04 11:23:24 +00:00
|
|
|
if test -c /dev/ttyp0
|
2005-08-31 10:45:47 +00:00
|
|
|
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
|
2013-01-24 07:28:45 +00:00
|
|
|
#
|
2007-09-02 14:00:52 +00:00
|
|
|
# Set the system clock from hardware clock
|
2011-12-14 06:27:27 +00:00
|
|
|
# If the timestamp is more recent than the current time,
|
2007-09-02 14:00:52 +00:00
|
|
|
# use the timestamp instead.
|
2012-03-13 19:14:40 +00:00
|
|
|
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
|
2010-11-04 11:34:12 +00:00
|
|
|
if test -e /etc/timestamp
|
2005-08-31 10:45:47 +00:00
|
|
|
then
|
2012-02-10 16:16:05 +00:00
|
|
|
SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
|
2010-11-04 11:34:12 +00:00
|
|
|
read TIMESTAMP < /etc/timestamp
|
2012-02-10 16:16:05 +00:00
|
|
|
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
|
2012-03-01 17:41:37 +00:00
|
|
|
date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
|
2012-03-13 19:14:40 +00:00
|
|
|
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
|
2007-09-02 14:00:52 +00:00
|
|
|
fi
|
2005-08-31 10:45:47 +00:00
|
|
|
fi
|
|
|
|
: exit 0
|