From c8c2b5eaf104ac42c22d7279f3d3aa1db650ad36 Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Sat, 26 Nov 2016 08:38:50 -0600 Subject: [PATCH 1/2] Added extra groups for other distros and modified the help to avoid rebooting --- back-end/checkDialout.js | 8 ++++---- front-end/linux-help.html | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/back-end/checkDialout.js b/back-end/checkDialout.js index ff753ed..7368780 100644 --- a/back-end/checkDialout.js +++ b/back-end/checkDialout.js @@ -14,9 +14,9 @@ function checkDialout(success, failure) { if(err) { failure(err); } else { - const groups = stdout.split(" "); - if(groups.indexOf("dialout") != -1) { - success(); + const groups = stdout; + if (groups.match(/(dialout|tty|uucp)/)) { + success(); } else { const dialoutMissingError = new Error(ERROR_MESSAGES.USER_NOT_IN_DIALOUT); failure(dialoutMissingError); @@ -26,4 +26,4 @@ function checkDialout(success, failure) { } module.exports = checkDialout; -module.exports.ERROR_MESSAGES = ERROR_MESSAGES; \ No newline at end of file +module.exports.ERROR_MESSAGES = ERROR_MESSAGES; diff --git a/front-end/linux-help.html b/front-end/linux-help.html index d220221..adbfed0 100644 --- a/front-end/linux-help.html +++ b/front-end/linux-help.html @@ -42,9 +42,10 @@

sudo usermod -a -G dialout $USER + sg dialout "npm start"

- Then log out or reboot your machine. + To make it permanent log out and back in, or reboot your machine.

From 9c108924e428b036743cf34cc80a577a8ec0d09b Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Sat, 26 Nov 2016 08:50:23 -0600 Subject: [PATCH 2/2] No need for sudo if you are in the correct groups --- DEVELOPING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 38c5c37..3a55602 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -25,5 +25,5 @@ npm start ``` npm install npm run pre-rebuild && npm run rebuild -sudo npm start -``` \ No newline at end of file +npm start +```