debian: add udev rules

Add /lib/udev/rules.d/50-rbd.rules to debian package.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
This commit is contained in:
Samuel Just 2011-03-07 16:03:08 -08:00 committed by Sage Weil
parent 95db4c5cb8
commit 863ef7c331
6 changed files with 13 additions and 2 deletions

View File

@ -6,7 +6,8 @@ SUBDIRS = . src qa man
EXTRA_DIST += \
src/test/run-cli-tests \
src/test/cli \
src/test/downloads
src/test/downloads \
udev/50-rbd.rules
check-local:
# Build gtest before we build our own tests. Doing this instead
# of SUBDIRS because with that, gtest's own tests would be run

View File

@ -1 +1,3 @@
usr/lib/librbd.so.*
usr/bin/crbdnamer
lib/udev/rules.d/50-rbd.rules

1
debian/rules vendored
View File

@ -41,6 +41,7 @@ install: build
dh_installdirs
$(MAKE) DESTDIR=$(DESTDIR) install
install -D -m 644 $(CURDIR)/udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
# Add here commands to install the package into debian/testpack.
# Build architecture-independent files here.

View File

@ -9,7 +9,7 @@ CLEANFILES =
bin_PROGRAMS =
sbin_PROGRAMS =
sbin_SCRIPTS =
bin_SCRIPTS = crun cclass $(srcdir)/cclsinfo cdebugpack
bin_SCRIPTS = crun cclass $(srcdir)/cclsinfo cdebugpack crbdnamer
# C/C++ tests to build will be appended to this
check_PROGRAMS =
# tests to actually run on "make check"; if you need extra, non-test,
@ -432,6 +432,7 @@ EXTRA_DIST = $(srcdir)/verify-mds-journal.sh $(srcdir)/vstart.sh $(srcdir)/stop.
$(srcdir)/cclass.in $(srcdir)/cdebugpack.in \
$(srcdir)/cclsinfo $(srcdir)/make_version $(srcdir)/check_version \
$(srcdir)/.git_version \
$(srcdir)/crbdnamer \
$(ceph_tool_gui_DATA)
# work around old versions of automake that don't define $docdir

5
src/crbdnamer Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
echo -n "cat /sys/devices/rbd/$1/pool"
echo -n " "
echo -n "cat /sys/devices/rbd/$1/name"

1
udev/50-rbd.rules Normal file
View File

@ -0,0 +1 @@
KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/crbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n"