Skip to content

Commit

Permalink
debian: add udev rules
Browse files Browse the repository at this point in the history
Add /lib/udev/rules.d/50-rbd.rules to debian package.

Signed-off-by: Samuel Just <[email protected]>
  • Loading branch information
Samuel Just authored and liewegas committed Mar 11, 2011
1 parent 95db4c5 commit 863ef7c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions debian/librbd1.install
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
usr/lib/librbd.so.*
usr/bin/crbdnamer
lib/udev/rules.d/50-rbd.rules
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/crbdnamer
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions udev/50-rbd.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/crbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n"

0 comments on commit 863ef7c

Please sign in to comment.