Advertisement
Guest User

firetv mount script

a guest
Dec 27th, 2014
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. #!/bin/bash
  2. # script for mount SMB shares (mostly) automatically for the firetv
  3. # this script will only work from a linux terminal with adb in its path
  4.  
  5. #set vars, duplicate using same syntax for future shares updating all variables in new stanzas to reflect
  6. #[share1]
  7. ftvip='192.168.1.249' #ip address of firetv
  8. share1_ip='192.168.1.67' #ip address of samba server
  9. share1_smb='photos' #samba share name
  10. share1_path='/mnt/obb/photos/' #mount point for share, include trailing /
  11. share1_usn='username' #username for share access
  12. share1_pwd='topsecretpw' #password for share access
  13.  
  14. adb connect $ftvip
  15. sleep 3
  16. adb shell "su -c mkdir $share1_path"
  17. adb shell "su -c mount -o noperm,unc=\\\\\\\\\\\\\\\\$share1_ip\\\\\\\\$share1_smb,username=$share1_usn,password=$share1_pwd -t cifs none $share1_path"
  18. #wtf is this, why do we need so many slashes thats retarded lets figure out a better way to clean this
  19. #[share2]
  20. ftvip='192.168.1.249' #ip address of firetv
  21. share2_ip='192.168.1.67' #ip address of samba server
  22. share2_smb='roms' #samba share name
  23. share2_path='/mnt/obb/roms/' #mount point for share, include trailing /
  24. share2_usn='username' #username for share access
  25. share2_pwd='topsecretpw' #password for share access
  26.  
  27. adb connect $ftvip
  28. sleep 3
  29. adb shell "su -c mkdir $share2_path"
  30. adb shell "su -c mount -o noperm,unc=\\\\\\\\\\\\\\\\$share2_ip\\\\\\\\$share2_smb,username=$share2_usn,password=$share2_pwd -t cifs none $share2_path"
  31. #wtf is this, why do we need so many slashes thats retarded lets figure out a better way to clean this
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement