Skip to content

Commit c5a4717

Browse files
committed
post_install.sh: Use uaccess tag in udev rules
Do not make the device node world-writeable, instead give access to the current desktop user. Also use one "here" document instead of mixing in echo statements, and customarily keep "then" on same line as "if". Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
1 parent 24138cc commit c5a4717

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

post_install.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/usr/bin/env bash
22

33
arduino_mbed_rules () {
4-
echo ""
5-
echo "# Arduino Mbed bootloader mode udev rules"
6-
echo ""
74
cat <<EOF
8-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", MODE:="0666"
9-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
10-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", MODE:="0666"
11-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0525", MODE:="0666"
5+
6+
# Arduino Mbed bootloader mode udev rules
7+
8+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", TAG+="uaccess"
9+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", TAG+="uaccess"
10+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", TAG+="uaccess"
11+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0525", TAG+="uaccess"
1212
EOF
1313
}
1414

15-
if [ "$EUID" -ne 0 ]
16-
then echo "Please run as root"
15+
if [ "$EUID" -ne 0 ]; then
16+
echo "Please run as root"
1717
exit
1818
fi
1919

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy