#!/bin/bash

. /usr/lib/rc/functions

case "$1" in
    start)
        stat_busy "Starting LVM2 groups"
        vgchange --sysinit -a y >/dev/null || stat_die
        add_daemon lvm2
        stat_done
        ;;
    stop)
        stat_busy "Stopping LVM2 groups"
        vgchange -a n &>/dev/null || stat_die
        rm_daemon lvm2
        stat_done
        ;;
    *)
        echo "usage: $0 {start|stop}"
        exit 1
        ;;
esac
