Skip to content
Snippets Groups Projects
Commit 5abe486c authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Fix empty SUDO_USER variable bug

parent 15ca1e87
No related branches found
No related tags found
No related merge requests found
Pipeline #4396 passed
......@@ -6,11 +6,14 @@ case "$1" in
configure)
#echo " Calling script"
#/var/lib/dpkg/info/iri-comm-dev.hello_world
echo " Addind user to dialout group..."
sudo usermod -a -G dialout $SUDO_USER
echo " Done."
echo " Adding 99-iri-comm-ftdi udev rule..."
if [ ! -z "$SUDO_USER" ]; then
echo " Addind user to dialout group..."
sudo usermod -a -G dialout $SUDO_USER
echo " Done."
fi
echo " Adding 99-iri-comm-ftdi udev rule..."
FILE="/lib/udev/rules.d/99-iri-comm-ftdi.rules"
LINE0="#The following line allow the users on dialout to access SUBSYSTEM:VENDOR:PRODUCT=usb|usb_device:0403:6001 devices"
LINE1="SUBSYSTEM==\"usb|usb_device\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6001\", GROUP=\"dialout\""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment