From 608992f17d5473f8270f0779d3b9bcfe8fbdfa1c Mon Sep 17 00:00:00 2001 From: root Date: Sun, 17 Jun 2012 00:03:04 +0000 Subject: Sun Jun 17 00:03:04 UTC 2012 --- staging/lvm2/lvm2_hook | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 staging/lvm2/lvm2_hook (limited to 'staging/lvm2/lvm2_hook') 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: -- cgit v1.2.3-54-g00ecf