Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Kasper's fix for USB drives with spaces in their names. #7

Merged
merged 1 commit into from

2 participants

@colinbdclark

Kasper, I've taken your changes from here:

https://github.com/GPII/linux/pull/6/files#diff-8

And merged them cleanly without all the other changes that were in your pull request. Can you double check that this works and push it if you're happy with it?

@colinbdclark

Kasper, I tested this on my Linux box with a key called "CARLA GREAT" (she stole your nickname) and it worked, well, great.

@kaspermarkus

worked like a charm.. thanks colin

@kaspermarkus kaspermarkus merged commit dde0504 into GPII:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 usbDriveListener/bin/handleUserDeviceEvent.sh
View
4 usbDriveListener/bin/handleUserDeviceEvent.sh
@@ -22,8 +22,8 @@ if [ $1 -eq 1 ]; then
sleep 1
done
- mountLocation=`mount | grep $2 |cut -d " " -f 3`
- token=`cat $mountLocation/.gpii-user-token.txt`
+ mountLocation=`mount | grep $2 | sed -e "s#/[^ ]\+ [^ ]\+ \(.*\) type.*#\1#"`
+ token=`cat "$mountLocation/.gpii-user-token.txt"`
echo "User logged in on device $2 with token ${token}." >> "$logFilePath"
echo $2:$token >> "$usersFilePath" # Keep the location and token in a users file.
curl http://localhost:8081/user/$token/login
Something went wrong with that request. Please try again.