File: make_static_nodes

package info (click to toggle)
dahdi-linux 1:2.11.1.0.20170917~dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 8,280 kB
  • sloc: ansic: 125,177; perl: 2,395; sh: 1,133; makefile: 427; xml: 24
file content (25 lines) | stat: -rwxr-xr-x 685 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# Generate static device file nodes for dahdi
# Most peopel won't need this, as the device file nodes are normally
# generated by udev. Also note that if you do use udev, /dev is a 
# ramdisk, and thus any changes you do to it will not be preserved
# on next boot.

mknod_safe() {
	if [ -c $1 ]; then return; fi
	mknod "$@" || true
}

mkdir -p /dev/dahdi
mknod_safe /dev/dahdi/ctl c 196 0
mknod_safe /dev/dahdi/transcode c 196 250
mknod_safe /dev/dahdi/timer c 196 253
mknod_safe /dev/dahdi/channel c 196 254
mknod_safe /dev/dahdi/pseudo c 196 255
for N in `seq 249`; do
        mknod_safe /dev/dahdi/$N c 196 $N
done
chown -R 0:dialout /dev/dahdi/
chmod 0660 /dev/dahdi/*