diff options
author | root <root@rshg054.dnsready.net> | 2012-05-27 00:05:57 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-05-27 00:05:57 +0000 |
commit | 1f45ad8e3f17397e2f44e68ef9a0d860091eea9e (patch) | |
tree | c739dcbb4950142bbb793715bfd19fb2d6cc80ef /staging/lvm2/lvm2_hook | |
parent | a5721a07196cf00c26ea1bfb651aab756d202ccb (diff) |
Sun May 27 00:05:56 UTC 2012
Diffstat (limited to 'staging/lvm2/lvm2_hook')
-rw-r--r-- | staging/lvm2/lvm2_hook | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/staging/lvm2/lvm2_hook b/staging/lvm2/lvm2_hook new file mode 100644 index 000000000..e69b3349a --- /dev/null +++ b/staging/lvm2/lvm2_hook @@ -0,0 +1,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: |