[arch-commits] Commit in lvm2/trunk (PKGBUILD lvm2_hook lvm2_install)

Thomas Bächler thomas at archlinux.org
Mon Feb 22 18:05:14 UTC 2010


    Date: Monday, February 22, 2010 @ 13:05:13
  Author: thomas
Revision: 69788

Add optional lvmwait= command line parameter, fixes FS#18428

Modified:
  lvm2/trunk/PKGBUILD
  lvm2/trunk/lvm2_hook
  lvm2/trunk/lvm2_install

--------------+
 PKGBUILD     |   10 ++++++----
 lvm2_hook    |    8 ++++++++
 lvm2_install |    5 +++++
 3 files changed, 19 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-02-22 18:04:56 UTC (rev 69787)
+++ PKGBUILD	2010-02-22 18:05:13 UTC (rev 69788)
@@ -15,10 +15,12 @@
 source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz
         lvm2_install
         lvm2_hook)
-md5sums=('33e0e0f4b4582d495ff619696c634b2a' 'a85c48433b516bbf4e64e8953cf3ac5c'\
-         '2915f3bf9d50964fdc94d7d7df2673d5')
-sha1sums=('7e5c7f28a476273fa2183f80f7c9db8783aab515' 'b102f047b48bd74915f2bac092901f9e5694ef3c'\
-         '732cb5178f9feb54075794b39ae93d21ceea8498')
+md5sums=('33e0e0f4b4582d495ff619696c634b2a'
+         'f781c9f5dd4f9934952c687b73d26a18'
+         '95bed25bdbc2c2d8500e7a07aeff7f65')
+sha1sums=('7e5c7f28a476273fa2183f80f7c9db8783aab515'
+          '583424bb0a6f89ffe4e4ea446b912f0fedac7050'
+          '0dc0c0d620f634c4d078afdb78e3bae15ccf957b')
                                           
 build() {
   cd "${srcdir}/LVM2.${_pkgverlvm}"

Modified: lvm2_hook
===================================================================
--- lvm2_hook	2010-02-22 18:04:56 UTC (rev 69787)
+++ lvm2_hook	2010-02-22 18:05:13 UTC (rev 69788)
@@ -7,6 +7,14 @@
             /bin/mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
         fi
 
+        # If the lvmwait= parameter has been specified on the command line
+        # wait for the device(s) before trying to activate the volume group(s)
+        if [ -n "${lvmwait}" ]; then
+            for pvdev in $(echo ${lvmwait} | sed 's|,| |g'); do
+                poll_device ${pvdev} ${rootdelay}
+            done
+        fi
+
         [ "${quiet}" = "y" ] && LVMQUIET=">/dev/null"
 
         msg "Scanning logical volumes..."

Modified: lvm2_install
===================================================================
--- lvm2_install	2010-02-22 18:04:56 UTC (rev 69787)
+++ lvm2_install	2010-02-22 18:05:13 UTC (rev 69788)
@@ -21,5 +21,10 @@
 {
 cat<<HELPEOF
   This hook loads the necessary modules for an LVM2 root device.
+
+  The optional lvmwait= parameter followed by a comma-separated
+  list of device names can be given on the command line.
+  It will cause the hook to wait until all given devices exist
+  before trying to scan and activate any volume groups.
 HELPEOF
 }




More information about the arch-commits mailing list