[Merge] lp:~ogra/phablet-tools/pahblet-shell-dbus-support into lp:phablet-tools

Sergio Schvezov sergio.schvezov at canonical.com
Fri Aug 15 02:37:26 UTC 2014


Review: Needs Information

Added one inline comment

Diff comments:

> === modified file 'phablet-shell'
> --- phablet-shell	2014-05-28 11:59:44 +0000
> +++ phablet-shell	2014-08-14 12:53:34 +0000
> @@ -62,10 +62,18 @@
>  
>  check_devices
>  
> +toggle_ssh(){
> +    DBUS_CALL="sudo -u phablet bash -c '/usr/bin/gdbus call -y \
> +        -d com.canonical.PropertyService -o /com/canonical/PropertyService \
> +        -m com.canonical.PropertyService.SetProperty ssh ${1} >/dev/null'"
> +    adb shell "$DBUS_CALL"
> +}

to make this transparent, can you add a check to see who the USER is on the other end and handle both cases to not have a flag day? The sudo might be a problem with password/PIN locked devices

> +
>  # Start ssh on the device and use port forwarding to connect to it.
>  # This means that we'll connect to the device through the USB cable
>  # and won't depend on if the device has it's wifi configured or not.
> -adb shell start ssh
> +toggle_ssh true
> +
>  for PORT in `seq 2222 2299`; do
>      adb forward tcp:$PORT tcp:22 && break
>  done
> @@ -92,3 +100,6 @@
>  
>  # Now connect to the device and provide the user with a shell.
>  ssh $SSH_OPTS phablet at localhost
> +
> +# turn off ssh access again
> +toggle_ssh false
> 


-- 
https://code.launchpad.net/~ogra/phablet-tools/pahblet-shell-dbus-support/+merge/230795
Your team Ubuntu Phablet Team is subscribed to branch lp:phablet-tools.



More information about the Ubuntu-reviews mailing list