~ubuntu-branches/ubuntu/natty/sysvinit/natty-updates

« back to all changes in this revision

Viewing changes to debian/initscripts/etc/init.d/rmnologin

  • 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:          rmnologin
4
 
# Required-Start:    $remote_fs $all
5
 
# Required-Stop: 
6
 
# Default-Start:     2 3 4 5
7
 
# Default-Stop:
8
 
# Short-Description: Remove /etc/nologin at boot
9
 
# Description:       This script removes the /etc/nologin file as the
10
 
#                    last step in the boot process, if DELAYLOGIN=yes.
11
 
#                    If DELAYLOGIN=no, /etc/nologin was not created by
12
 
#                    bootmisc earlier in the boot process.
13
 
### END INIT INFO
14
 
 
15
 
PATH=/sbin:/bin
16
 
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
17
 
. /lib/init/vars.sh
18
 
 
19
 
do_start () {
20
 
        #
21
 
        # If login delaying is enabled then remove the flag file
22
 
        #
23
 
        case "$DELAYLOGIN" in
24
 
          Y*|y*)
25
 
                rm -f /var/lib/initscripts/nologin
26
 
                ;;
27
 
        esac
28
 
}
29
 
 
30
 
do_status () {
31
 
        if [ ! -f /var/lib/initscripts/nologin ] ; then
32
 
                return 0
33
 
        else
34
 
                return 4
35
 
        fi
36
 
}
37
 
 
38
 
case "$1" in
39
 
  start)
40
 
        do_start
41
 
        ;;
42
 
  restart|reload|force-reload)
43
 
        echo "Error: argument '$1' not supported" >&2
44
 
        exit 3
45
 
        ;;
46
 
  stop)
47
 
        # No-op
48
 
        ;;
49
 
  status)
50
 
        do_status
51
 
        echo $?
52
 
        ;;
53
 
  *)
54
 
        echo "Usage: $0 start|stop" >&2
55
 
        exit 3
56
 
        ;;
57
 
esac
58
 
 
59
 
: