summaryrefslogtreecommitdiff
path: root/core/btrfs-progs
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-07-29 00:03:59 +0000
committerroot <root@rshg054.dnsready.net>2012-07-29 00:03:59 +0000
commitddab05fd84b7fa1d67fcd18b532f0427189d8df1 (patch)
tree3a7175c54dfa9c4ae09f2b009b209134af81ba63 /core/btrfs-progs
parent4704d1255f08718ed432ba919b4087d0a52ce5a7 (diff)
Sun Jul 29 00:03:59 UTC 2012
Diffstat (limited to 'core/btrfs-progs')
-rw-r--r--core/btrfs-progs/70-btrfs.rules1
-rw-r--r--core/btrfs-progs/PKGBUILD13
-rw-r--r--core/btrfs-progs/initcpio-hook-btrfs5
-rw-r--r--core/btrfs-progs/initcpio-install-btrfs4
4 files changed, 17 insertions, 6 deletions
diff --git a/core/btrfs-progs/70-btrfs.rules b/core/btrfs-progs/70-btrfs.rules
new file mode 100644
index 000000000..c0e8c776c
--- /dev/null
+++ b/core/btrfs-progs/70-btrfs.rules
@@ -0,0 +1 @@
+ACTION!="remove", SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="btrfs", RUN+="/usr/bin/btrfs device scan /dev/%k"
diff --git a/core/btrfs-progs/PKGBUILD b/core/btrfs-progs/PKGBUILD
index 8b3f37ea8..2c5b6f907 100644
--- a/core/btrfs-progs/PKGBUILD
+++ b/core/btrfs-progs/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 160394 2012-06-01 13:21:40Z dreisner $
+# $Id: PKGBUILD 164224 2012-07-27 20:04:40Z dreisner $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=btrfs-progs
pkgver=0.19.20120328
-pkgrel=3
+pkgrel=4
pkgdesc="btrfs filesystem utilities"
arch=(i686 x86_64)
depends=('glibc' 'e2fsprogs')
@@ -13,11 +13,13 @@ conflicts=('btrfs-progs-unstable')
provides=('btrfs-progs-unstable')
license=('GPL2')
source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz
+ 70-btrfs.rules
initcpio-install-btrfs
initcpio-hook-btrfs)
md5sums=('f4504e73cf9254779b78d5b2318ac570'
- '3eae9bf1541e297fa72aa40ebf7320c6'
- 'b09688a915a0ec8f40e2f5aacbabc9ad')
+ '345c62c8b267082361729ca5b647518f'
+ 'e5186ec3fe8a809b7473470128d1c4ab'
+ '9fb35142755b477a96cb7292f3d64839')
build() {
cd $srcdir/$pkgname-$pkgver
@@ -33,6 +35,9 @@ package() {
mkdir -p ${pkgdir}/sbin
ln -sf /usr/bin/btrfs ${pkgdir}/sbin/btrfs
+ # add udev rule
+ install -Dm644 "$srcdir/70-btrfs.rules" "$pkgdir/usr/lib/udev/rules.d/70-btrfs.rules"
+
# install mkinitcpio hooks
install -Dm644 "$srcdir/initcpio-install-btrfs" \
"$pkgdir/usr/lib/initcpio/install/btrfs"
diff --git a/core/btrfs-progs/initcpio-hook-btrfs b/core/btrfs-progs/initcpio-hook-btrfs
index 7965d0a8a..913cec528 100644
--- a/core/btrfs-progs/initcpio-hook-btrfs
+++ b/core/btrfs-progs/initcpio-hook-btrfs
@@ -1,7 +1,10 @@
#!/usr/bin/ash
run_hook() {
- btrfs device scan
+ # if udevd is running, this is done async by add/change events
+ if [ "$udevd_running" -ne 1 ]; then
+ btrfs device scan
+ fi
}
# vim: set ft=sh ts=4 sw=4 et:
diff --git a/core/btrfs-progs/initcpio-install-btrfs b/core/btrfs-progs/initcpio-install-btrfs
index a70a324ed..aad263378 100644
--- a/core/btrfs-progs/initcpio-install-btrfs
+++ b/core/btrfs-progs/initcpio-install-btrfs
@@ -1,9 +1,11 @@
#!/bin/bash
build() {
- add_all_modules btrfs
+ add_module btrfs
add_binary btrfs
add_runscript
+
+ add_file /usr/lib/udev/rules.d/70-btrfs.rules
}
help() {