summaryrefslogtreecommitdiff
path: root/core/lvm2
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-03 00:04:14 +0000
committerroot <root@rshg054.dnsready.net>2012-06-03 00:04:14 +0000
commitd915cad658736d96368750201c34df752048751a (patch)
treea6d70fb8b01aaa111efbc8a6874a8f94b882626d /core/lvm2
parent211709a2f09bd677aa1deac0dc82fde6ce1c8626 (diff)
Sun Jun 3 00:04:13 UTC 2012
Diffstat (limited to 'core/lvm2')
-rw-r--r--core/lvm2/PKGBUILD14
-rw-r--r--core/lvm2/lvm2_hook39
-rw-r--r--core/lvm2/lvm2_install32
3 files changed, 46 insertions, 39 deletions
diff --git a/core/lvm2/PKGBUILD b/core/lvm2/PKGBUILD
index e70165f98..9cbb8bcf3 100644
--- a/core/lvm2/PKGBUILD
+++ b/core/lvm2/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 158638 2012-05-05 04:07:30Z eric $
+# $Id: PKGBUILD 160347 2012-06-01 12:56:44Z dreisner $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
pkgver=2.02.95
-pkgrel=4
+pkgrel=6
arch=('i686' 'x86_64')
url="http://sourceware.org/lvm2/"
license=('GPL2' 'LGPL2.1')
@@ -16,13 +16,19 @@ source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${pkgver}.tgz{,.asc}
11-dm-initramfs.rules)
sha1sums=('f61dfbd8e9219291d11de3d70f0b3d20a29fae85'
'45f5e31045065e7bdf5d6f2e21c857b4978024b4'
- '08007f13cf1a9caf6e4aca76dd2ed6a4ab037601'
- '7d63aa838703c9f986531a78164b556f765f5cce'
+ '3e1680f9b76ce9150d08865d99db90fd15532271'
+ 'cedc9948123c870f9c5aa3357d0075b41a9c8135'
'f6a554eea9557c3c236df2943bb6e7e723945c41')
build() {
cd "${srcdir}/LVM2.${pkgver}"
unset LDFLAGS
+
+ # libudev.so.1.0.0 compat
+ sed -i 's,udev_get_dev_path([^)]\+),"/dev",' \
+ tools/dmsetup.c \
+ lib/misc/lvm-wrappers.c
+
./configure --prefix=/ --sysconfdir=/etc --localstatedir=/var --datarootdir=/usr/share \
--includedir=/usr/include --with-usrlibdir=/usr/lib --libdir=/usr/lib --with-udev-prefix=/usr \
--enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \
diff --git a/core/lvm2/lvm2_hook b/core/lvm2/lvm2_hook
index efb104998..e69b3349a 100644
--- a/core/lvm2/lvm2_hook
+++ b/core/lvm2/lvm2_hook
@@ -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:
diff --git a/core/lvm2/lvm2_install b/core/lvm2/lvm2_install
index 98a995b14..145ce49b2 100644
--- a/core/lvm2/lvm2_install
+++ b/core/lvm2/lvm2_install
@@ -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 @@ build()
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: