~ubuntu-branches/ubuntu/natty/sysvinit/natty-proposed

« back to all changes in this revision

Viewing changes to debian/initscripts/etc/init.d/bootmisc.sh

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-09-15 02:45:59 UTC
  • Revision ID: james.westby@ubuntu.com-20090915024559-2bv3ihsb0cu9xw2c
Tags: 2.87dsf-4ubuntu3
FFE LP: #427356.

* Various initscripts have been replaced by Upstart jobs shipped in
  other packages, the following have been removed:
  - hostname.sh
  - mountkernfs.sh
  - mountdevsubfs.sh
  - checkroot.sh
  - mtab.sh
  - checkfs.sh
  - mountall.sh
  - mountall-bootclean.sh
  - mountoverflowtmp
  - mountnfs.sh
  - mountnfs-bootclean.sh
  - bootmisc.sh
  - bootlogs
  - rmnlogin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
### BEGIN INIT INFO
3
 
# Provides:          bootmisc
4
 
# Required-Start:    $remote_fs
5
 
# Required-Stop:
6
 
# Should-Start:      udev
7
 
# Default-Start:     S
8
 
# Default-Stop:
9
 
# Short-Description: Miscellaneous things to be done during bootup.
10
 
# Description:       Some cleanup.  Note, it need to run after mountnfs-bootclean.sh.
11
 
### END INIT INFO
12
 
 
13
 
PATH=/sbin:/usr/sbin:/bin:/usr/bin
14
 
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
15
 
. /lib/init/vars.sh
16
 
 
17
 
do_start () {
18
 
        #
19
 
        # If login delaying is enabled then create the flag file
20
 
        # which prevents logins before startup is complete
21
 
        #
22
 
        case "$DELAYLOGIN" in
23
 
          Y*|y*)
24
 
                echo "System bootup in progress - please wait" > /var/lib/initscripts/nologin
25
 
                ;;
26
 
        esac
27
 
 
28
 
        # Create /var/run/utmp so we can login.
29
 
        : > /var/run/utmp
30
 
        if grep -q ^utmp: /etc/group
31
 
        then
32
 
                chmod 664 /var/run/utmp
33
 
                chgrp utmp /var/run/utmp
34
 
        fi
35
 
 
36
 
        # Set pseudo-terminal access permissions.
37
 
        if [ ! -e /dev/.devfsd ] && [ ! -e /dev/.udev ] && [ -c /dev/ttyp0 ]
38
 
        then
39
 
                chmod -f 666 /dev/tty[p-za-e][0-9a-f]
40
 
                chown -f root:tty /dev/tty[p-za-e][0-9a-f]
41
 
        fi
42
 
 
43
 
        # Remove bootclean's flag files.
44
 
        # Don't run bootclean again after this!
45
 
        rm -f /tmp/.clean /var/run/.clean /var/lock/.clean
46
 
}
47
 
 
48
 
case "$1" in
49
 
  start|"")
50
 
        do_start
51
 
        ;;
52
 
  restart|reload|force-reload)
53
 
        echo "Error: argument '$1' not supported" >&2
54
 
        exit 3
55
 
        ;;
56
 
  stop)
57
 
        # No-op
58
 
        ;;
59
 
  *)
60
 
        echo "Usage: bootmisc.sh [start|stop]" >&2
61
 
        exit 3
62
 
        ;;
63
 
esac
64
 
 
65
 
: