~ubuntu-branches/ubuntu/quantal/lvm2/quantal

« back to all changes in this revision

Viewing changes to debian/lvm2.init

  • Committer: Steve Langasek
  • Date: 2012-04-14 02:57:53 UTC
  • mfrom: (3.1.22 sid)
  • Revision ID: steve.langasek@canonical.com-20120414025753-ejbdw9c8llik58y9
Merge version 2.02.88-2 from Debian testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
### BEGIN INIT INFO
3
3
# Provides:          lvm2 lvm
4
 
# Required-Start:    mountdevsubfs udev
 
4
# Required-Start:    mountdevsubfs
5
5
# Required-Stop:
6
 
# Should-Start:      mdadm-raid cryptdisks-early multipath-tools-boot
 
6
# Should-Start:      udev mdadm-raid cryptdisks-early multipath-tools-boot
7
7
# Should-Stop:       umountroot mdadm-raid
8
8
# X-Start-Before:    checkfs mountall
9
9
# X-Stop-After:      umountfs
10
10
# Default-Start:     S
11
 
# Default-Stop:      0 6
 
11
# Default-Stop:
12
12
### END INIT INFO
13
13
 
14
14
SCRIPTNAME=/etc/init.d/lvm2
20
20
do_start()
21
21
{
22
22
        modprobe dm-mod 2> /dev/null || :
23
 
        /sbin/vgscan --ignorelockingfailure --mknodes || :
 
23
        /sbin/vgscan --ignorelockingfailure || :
24
24
        /sbin/vgchange -aly --ignorelockingfailure || return 2
25
25
}
26
26
 
27
 
do_stop()
28
 
{
29
 
        /sbin/vgchange -aln --ignorelockingfailure || return 2
30
 
}
31
 
 
32
27
case "$1" in
33
28
  start)
34
29
        log_begin_msg "Setting up LVM Volume Groups"
38
33
                2) log_end_msg 1 ;;
39
34
        esac
40
35
        ;;
41
 
  stop)
42
 
        log_begin_msg "Shutting down LVM Volume Groups"
43
 
        do_stop
44
 
        case "$?" in
45
 
                0|1) log_end_msg 0 ;;
46
 
                2) log_end_msg 1 ;;
47
 
        esac
48
 
        ;;
49
 
  restart|force-reload)
 
36
  stop|restart|force-reload|status)
50
37
        ;;
51
38
  *)
52
 
        echo "Usage: $SCRIPTNAME {start|stop}" >&2
 
39
        echo "Usage: $SCRIPTNAME start" >&2
53
40
        exit 3
54
41
        ;;
55
42
esac