~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to vivid/etc/init.d/checkroot-bootclean.sh

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
### BEGIN INIT INFO
 
3
# Provides:          checkroot-bootclean
 
4
# Required-Start:    checkroot
 
5
# Required-Stop:
 
6
# Default-Start:     S
 
7
# Default-Stop:
 
8
# X-Start-Before:    bootmisc
 
9
# Short-Description: bootclean after checkroot.
 
10
# Description:       Clean temporary filesystems after
 
11
#                    the root filesystem has been mounted.
 
12
#                    At this point, directories which may be
 
13
#                    masked by future mounts may be cleaned.
 
14
### END INIT INFO
 
15
 
 
16
. /lib/lsb/init-functions
 
17
. /lib/init/bootclean.sh
 
18
 
 
19
case "$1" in
 
20
  start|"")
 
21
        # Clean /tmp, /run and /run/lock.  Remove the .clean files to
 
22
        # force initial cleaning.  This is intended to allow cleaning
 
23
        # of directories masked by mounts while the system was
 
24
        # previously running, which would otherwise prevent them being
 
25
        # cleaned.
 
26
        rm -f /tmp/.clean /run/.clean /run/lock/.clean
 
27
 
 
28
        clean_all
 
29
        exit $?
 
30
        ;;
 
31
  restart|reload|force-reload)
 
32
        echo "Error: argument '$1' not supported" >&2
 
33
        exit 3
 
34
        ;;
 
35
  stop)
 
36
        # No-op
 
37
        ;;
 
38
  *)
 
39
        echo "Usage: checkroot-bootclean.sh [start|stop]" >&2
 
40
        exit 3
 
41
        ;;
 
42
esac
 
43
 
 
44
: