From d1fc926e7f2cc6f426ce94d9ef0e003b7698fb89 Mon Sep 17 00:00:00 2001 From: Chris Esposito Date: Sun, 23 Jun 2019 14:22:42 +1000 Subject: [PATCH] Take 2... --- Desktop_Interface/resources/AppRun | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Desktop_Interface/resources/AppRun b/Desktop_Interface/resources/AppRun index f930ff0c..9b19f9c5 100644 --- a/Desktop_Interface/resources/AppRun +++ b/Desktop_Interface/resources/AppRun @@ -42,20 +42,20 @@ if [ -n "$cxxpath" ] || [ -n "$gccpath" ]; then fi if [ ! -f /etc/udev/rules.d/69-labrador.rules ]; then - cat > /tmp/roothelper <<\EOoF - #!/bin/bash - cat > /etc/udev/rules.d/69-labrador.rules <<\EOF - ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="ba94", SYMLINK="EspoTek_Labrador", MODE="0666" - ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="2fe4", SYMLINK="ATXMEGA32A4U DFU Bootloader", MODE="0666" - EOF - udevadm trigger - EOoF - chmod a+x /tmp/roothelper +cat > /tmp/roothelper <<\EOoF +#!/bin/bash +cat > /etc/udev/rules.d/69-labrador.rules <<\EOF +ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="ba94", SYMLINK="EspoTek_Labrador", MODE="0666" +ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="2fe4", SYMLINK="ATXMEGA32A4U DFU Bootloader", MODE="0666" +EOF +udevadm trigger +EOoF +chmod a+x /tmp/roothelper - sudo true && sudo /tmp/roothelper - sudo true || pkexec --disable-internal-agent /tmp/roothelper || true +sudo true && sudo /tmp/roothelper +sudo true || pkexec --disable-internal-agent /tmp/roothelper || true - rm /tmp/roothelper +rm /tmp/roothelper fi exec "$HERE/usr/bin/Labrador" "$@"