summaryrefslogtreecommitdiffstats
path: root/abs/core/lvm2/lvm2_hook
blob: e69b3349ab2ed3f0885f6245a225b1c9a307acd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/ash

run_hook() {
    local pvdev

    modprobe -q dm-mod >/dev/null 2>&1

    # If the lvmwait= parameter has been specified on the command line
    # wait for the device(s) before trying to activate the volume group(s)
    for pvdev in ${lvmwait//,/ }; do
        poll_device ${pvdev} ${rootdelay}
    done

    msg "Activating logical volumes..."
    [ -d /etc/lvm ] && lvm vgscan

    if [ -n "$quiet" ]; then
      lvm vgchange --sysinit -a y >/dev/null
    else
      lvm vgchange --sysinit -a y
    fi
}

# vim: set ft=sh ts=4 sw=4 et: