diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/lvm2 | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core-testing/lvm2')
-rw-r--r-- | abs/core-testing/lvm2/PKGBUILD | 35 | ||||
-rw-r--r-- | abs/core-testing/lvm2/lvm2_hook | 16 | ||||
-rw-r--r-- | abs/core-testing/lvm2/lvm2_install | 19 |
3 files changed, 70 insertions, 0 deletions
diff --git a/abs/core-testing/lvm2/PKGBUILD b/abs/core-testing/lvm2/PKGBUILD new file mode 100644 index 0000000..1819c76 --- /dev/null +++ b/abs/core-testing/lvm2/PKGBUILD @@ -0,0 +1,35 @@ +# $Id: PKGBUILD 1726 2008-05-15 13:19:26Z thomas $ +# Maintainer: Thomas Baechler <thomas@archlinux.org> +pkgname=lvm2 +pkgver=2.02.37 +pkgrel=10 +pkgdesc="Logical Volume Manager 2 utilities" +arch=('i686' 'x86_64') +license=('GPL') +url="http://sourceware.org/lvm2/" +groups=('base') +depends=('device-mapper>=1.02.22') +conflicts=('lvm') +backup=('etc/lvm/lvm.conf') +source=(ftp://sources.redhat.com/pub/lvm2/LVM2.$pkgver.tgz + lvm2_install + lvm2_hook) +md5sums=('19c19e1f31ec548dc31982478a8a5f63' + '40dccdb1044f00fc1e29ca549933d4bd' + '73c8c2eba0fe891712c859c18b5b8aa2') + +build() { + cd $startdir/src/LVM2.$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make || return 1 + make DESTDIR=$startdir/pkg sbindir=$startdir/pkg/sbin install || return 1 + mkdir -p $startdir/pkg/etc/lvm/{archive,backup} + # a static binary is required for Arch's initrd + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --enable-static_link + make || return 1 + install -D -m755 tools/lvm.static $startdir/pkg/sbin/lvm.static + # add hook + install -D -m644 $startdir/src/lvm2_hook $startdir/pkg/lib/initcpio/hooks/lvm2 + install -D -m644 $startdir/src/lvm2_install $startdir/pkg/lib/initcpio/install/lvm2 +} diff --git a/abs/core-testing/lvm2/lvm2_hook b/abs/core-testing/lvm2/lvm2_hook new file mode 100644 index 0000000..b98e87d --- /dev/null +++ b/abs/core-testing/lvm2/lvm2_hook @@ -0,0 +1,16 @@ +# vim:set ft=sh: +run_hook () +{ + /sbin/modprobe -q dm-mod >/dev/null 2>&1 + if [ -e "/sys/class/misc/device-mapper" ]; then + read dev_t < /sys/class/misc/device-mapper/dev + /bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':') + + [ "${quiet}" = "y" ] && LVMQUIET=">/dev/null" + + msg "Scanning logical volumes..." + eval /bin/lvm vgscan --ignorelockingfailure $LVMQUIET + msg "Activating logical volumes..." + eval /bin/lvm vgchange --ignorelockingfailure -ay $LVMQUIET + fi +} diff --git a/abs/core-testing/lvm2/lvm2_install b/abs/core-testing/lvm2/lvm2_install new file mode 100644 index 0000000..c6cacc3 --- /dev/null +++ b/abs/core-testing/lvm2/lvm2_install @@ -0,0 +1,19 @@ +# vim: set ft=sh: + +install () +{ + MODULES=" dm-mod " + BINARIES="" + FILES="" + SCRIPT="lvm2" + + add_dir "/dev/mapper" + add_file "/sbin/lvm.static" "/bin/lvm" +} + +help () +{ +cat<<HELPEOF + This hook loads the necessary modules for an LVM2 root device. +HELPEOF +} |