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

Dave Reisner dreisner at archlinux.org
Sat May 26 00:57:50 UTC 2012


    Date: Friday, May 25, 2012 @ 20:57:49
  Author: dreisner
Revision: 159663

upgpkg: lvm2 2.02.95-5

- rebuild for libudev soname bump
- cleanup mkinitcpio runtime hook
- update install hook for mkinitcpio 0.9.0 changes

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

--------------+
 PKGBUILD     |    6 +++---
 lvm2_hook    |   39 +++++++++++++++++++--------------------
 lvm2_install |   32 +++++++++++++++++---------------
 3 files changed, 39 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-05-26 00:49:53 UTC (rev 159662)
+++ PKGBUILD	2012-05-26 00:57:49 UTC (rev 159663)
@@ -5,7 +5,7 @@
 pkgbase=lvm2
 pkgname=('lvm2' 'device-mapper')
 pkgver=2.02.95
-pkgrel=4
+pkgrel=5
 arch=('i686' 'x86_64')
 url="http://sourceware.org/lvm2/"
 license=('GPL2' 'LGPL2.1')
@@ -16,8 +16,8 @@
         11-dm-initramfs.rules)
 sha1sums=('f61dfbd8e9219291d11de3d70f0b3d20a29fae85'
           '45f5e31045065e7bdf5d6f2e21c857b4978024b4'
-          '08007f13cf1a9caf6e4aca76dd2ed6a4ab037601'
-          '7d63aa838703c9f986531a78164b556f765f5cce'
+          '3e1680f9b76ce9150d08865d99db90fd15532271'
+          'cedc9948123c870f9c5aa3357d0075b41a9c8135'
           'f6a554eea9557c3c236df2943bb6e7e723945c41')
 
 build() {

Modified: lvm2_hook
===================================================================
--- lvm2_hook	2012-05-26 00:49:53 UTC (rev 159662)
+++ lvm2_hook	2012-05-26 00:57:49 UTC (rev 159663)
@@ -1,25 +1,24 @@
-# vim:set ft=sh:
-run_hook ()
-{
-    /sbin/modprobe -q dm-mod >/dev/null 2>&1
-    if [ -e "/sys/class/misc/device-mapper" ]; then
-        if [ ! -e "/dev/mapper/control" ]; then
-            local major minor
-            IFS=: read major minor < /sys/class/misc/device-mapper/dev
-            mkdir /dev/mapper
-            mknod "/dev/mapper/control" c ${major} ${minor}
-        fi
+#!/usr/bin/ash
 
-        # 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
+run_hook() {
+    local pvdev
 
-        [ "${quiet}" = "y" ] && LVMQUIET=">/dev/null"
+    modprobe -q dm-mod >/dev/null 2>&1
 
-        msg "Activating logical volumes..."
-        [ -d /etc/lvm ] && /sbin/lvm vgscan
-        eval /sbin/lvm vgchange --sysinit -a y $LVMQUIET
+    # 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:

Modified: lvm2_install
===================================================================
--- lvm2_install	2012-05-26 00:49:53 UTC (rev 159662)
+++ lvm2_install	2012-05-26 00:57:49 UTC (rev 159663)
@@ -1,11 +1,10 @@
-# vim: set ft=sh:
+#!/bin/bash
 
-build()
-{
-    MODULES=" dm-mod dm-snapshot dm-mirror"
-    BINARIES=""
-    FILES=""
-    SCRIPT="lvm2"
+build() {
+    local mod
+    for mod in dm-mod dm-snapshot dm-mirror; do
+        add_module "$mod"
+    done
 
     add_binary "/sbin/lvm"
     add_binary "/sbin/dmsetup"
@@ -14,16 +13,19 @@
     add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
     add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
     add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+
+    add_runscript
 }
 
-help ()
-{
-cat<<HELPEOF
-  This hook loads the necessary modules for an LVM2 root device.
+help() {
+  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.
+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
 }
+
+# vim: set ft=sh ts=4 sw=4 et:




More information about the arch-commits mailing list