summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2003-01-15 13:08:16 +0000
committerMarcel Holtmann <marcel@holtmann.org>2003-01-15 13:08:16 +0000
commit13c90373161dea879719e09696d6dc6141465264 (patch)
tree998c1328e8eef91bad002ead39e7476c939bcdbe /scripts
parent3e8471f6fc3e46a168ebb1bdfacdfb182c746f59 (diff)
downloadbluez-13c90373161dea879719e09696d6dc6141465264.tar.gz
Add the create_dev script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/create_dev29
2 files changed, 30 insertions, 1 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4d86094a2..812f160a5 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -4,7 +4,7 @@
bin_SCRIPTS = bluepin
-EXTRA_DIST = bluepin bluetooth.rc.rh bluetooth.rc.deb
+EXTRA_DIST = bluepin bluetooth.rc.rh bluetooth.rc.deb create_dev
install-data-local: @DISTRO@
diff --git a/scripts/create_dev b/scripts/create_dev
new file mode 100755
index 000000000..4ea0c2637
--- /dev/null
+++ b/scripts/create_dev
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Create Bluetooth devices in /dev
+#
+# $Id$
+#
+
+VHCI_MAJOR=10
+VHCI_MINOR=250
+
+RFCOMM_MAJOR=216
+
+#
+# Create device for VHCI
+#
+if [ ! -c /dev/vhci ]; then
+ mknod /dev/vhci c ${VHCI_MAJOR} ${VHCI_MINOR}
+ chmod 664 /dev/vhci
+fi
+
+#
+# Create devices for RFCOMM
+#
+for i in `seq 0 255`
+do
+ if [ ! -c /dev/rfcomm$i ]; then
+ mknod -m 666 /dev/rfcomm$i c ${RFCOMM_MAJOR} $i
+ fi
+done