4 # Required-Start: $local_fs hostname $remote_fs
5 # Required-Stop: $local_fs
8 # Short-Description: Miscellaneous things to be done during bootup.
12 PATH=/sbin:/usr/sbin:/bin:/usr/bin
13 [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
18 # If login delaying is enabled then create the flag file
19 # which prevents logins before startup is complete
23 echo "System bootup in progress - please wait" > /var/lib/initscripts/nologin
27 # Create /var/run/utmp so we can login.
29 if grep -q ^utmp: /etc/group
31 chmod 664 /var/run/utmp
32 chgrp utmp /var/run/utmp
35 # Set pseudo-terminal access permissions.
36 if [ ! -e /dev/.devfsd ] && [ -c /dev/ttyp0 ]
38 chmod -f 666 /dev/tty[p-za-e][0-9a-f]
39 chown -f root:tty /dev/tty[p-za-e][0-9a-f]
43 #uname -snrvm > /var/run/motd
44 #[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
45 cp /etc/motd /var/run/motd
47 # Save kernel messages in /var/log/dmesg
48 if which dmesg >/dev/null 2>&1
50 savelog -q -p -c 5 /var/log/dmesg
51 dmesg -s 524288 > /var/log/dmesg
52 chgrp adm /var/log/dmesg || :
55 savelog -q -p -c 5 /var/log/dmesg
56 dd if=/dev/klog of=/var/log/dmesg &
59 [ -f /var/log/dmesg ] && { chgrp adm /var/log/dmesg || : ; }
63 # Save udev log in /var/log/udev
65 if [ -e /dev/.udev.log ]
67 mv -f /dev/.udev.log /var/log/udev
70 # Remove bootclean's flag files.
71 # Don't run bootclean again after this!
72 rm -f /tmp/.clean /var/run/.clean /var/lock/.clean
79 restart|reload|force-reload)
80 echo "Error: argument '$1' not supported" >&2
87 echo "Usage: bootmisc.sh [start|stop]" >&2