Browse Source

configure option --with-udevrules-group to allow customising the group name used

Luke Dashjr 11 years ago
parent
commit
683f8f8016
3 changed files with 19 additions and 1 deletions
  1. 1 1
      70-bfgminer.rules.in
  2. 3 0
      README
  3. 15 0
      configure.ac

+ 1 - 1
70-bfgminer.rules.in

@@ -54,7 +54,7 @@ GOTO="bfgminer_end"
 
 
 LABEL="bfgminer_add"
 LABEL="bfgminer_add"
 
 
-GROUP="video"
+@USE_UDEVRULES_GROUP_TRUE@GROUP="@UDEVRULES_GROUP@"
 ENV{ID_MM_DEVICE_IGNORE}="1"
 ENV{ID_MM_DEVICE_IGNORE}="1"
 
 
 LABEL="bfgminer_end"
 LABEL="bfgminer_end"

+ 3 - 0
README

@@ -191,6 +191,9 @@ BFGMiner dependency configuration options:
 	                        Use system libblkmaker rather than bundled one
 	                        Use system libblkmaker rather than bundled one
 	                        (default disabled)
 	                        (default disabled)
 	--with-udevrulesdir=DIR Install udev rules into this directory
 	--with-udevrulesdir=DIR Install udev rules into this directory
+	--with-udevrules-group=groupname
+	                        Configure mining devices to be owned by a specific
+	                        group (default `video')
 	--without-uio           Compile support for PCI devices via Linux UIO
 	--without-uio           Compile support for PCI devices via Linux UIO
 	                        interface (default enabled)
 	                        interface (default enabled)
 	--without-vfio          Compile support for PCI devices via Linux VFIO
 	--without-vfio          Compile support for PCI devices via Linux VFIO

+ 15 - 0
configure.ac

@@ -253,6 +253,21 @@ AC_ARG_ENABLE([broad-udevrules],
 	]
 	]
 )
 )
 
 
+use_udevrules_group=true
+udevrules_group="video"
+AC_ARG_WITH([udevrules-group],
+	[AC_HELP_STRING([--with-udevrules-group=groupname],[Configure mining devices to be owned by a specific group (default `video')])],
+	[
+		if test "x$withval" = "xno"; then
+			use_udevrules_group=false
+		else
+			udevrules_group="$withval"
+		fi
+	]
+)
+AM_CONDITIONAL([USE_UDEVRULES_GROUP], [$use_udevrules_group])
+AC_SUBST([UDEVRULES_GROUP], [$udevrules_group])
+
 
 
 algolist="$algolist scrypt"
 algolist="$algolist scrypt"
 AC_ARG_ENABLE([scrypt],
 AC_ARG_ENABLE([scrypt],