summaryrefslogtreecommitdiff
path: root/linux-compatible-tty.conf
blob: 086aa509ad9aaf674b60161e8b9538973c39b9f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This FreeBSD devd-script creates Linux-like TTY device nodes under /compat/ubuntu/dev/.
# This fixes `arduino-cli upload`.

notify 100 {
	match "system"    "DEVFS";
	match "subsystem" "CDEV";
	match "type"      "CREATE";
	match "cdev"      "cuaU[0-9]+";

	action "ln -s $cdev /compat/ubuntu/dev/`echo $cdev | sed 's/^cuaU/ttyACM/'`";
};

notify 100 {
	match "system"    "DEVFS";
	match "subsystem" "CDEV";
	match "type"      "DESTROY";
	match "cdev"      "cuaU[0-9]+";

	action "rm /compat/ubuntu/dev/`echo $cdev | sed 's/^cuaU/ttyACM/'`";
};