Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. proc /proc proc defaults 0 0
  2. /dev/mmcblk0p5 /boot vfat defaults 0 2
  3. /dev/mmcblk0p6 / ext4 defaults,noatime 0 1
  4. //192.168.2.11/Videos /home/pi/NASvideos cifs username=NASUSER,password=NASPAS,iocharset=utf8 0 0
  5. # a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that
  6.  
  7. sudo nano /etc/init.d/mountscript
  8.  
  9. #! /bin/sh
  10. # /etc/init.d/mountscript
  11.  
  12. ### BEGIN INIT INFO
  13. # Provides: Mounting of all drives
  14. # Required-Start: $remote_fs $syslog
  15. # Required-Stop: $remote_fs $syslog
  16. # Default-Start: 2 3 4 5
  17. # Default-Stop: 0 1 6
  18. # Short-Description: Simple script to mount drives at boot
  19. # Description: Added 30jan 2014
  20. ### END INIT INFO
  21.  
  22. #Now mount all drives
  23. sudo mount -a
  24. echo "All drives mounted"
  25.  
  26. sudo chmod 755 /etc/init.d/mountscript
  27.  
  28. sudo /etc/init.d/mountscript start
  29.  
  30. sudo update-rc.d mountscript defaults
  31.  
  32. sudo reboot
  33. ls NAMEOFDRIVE
  34.  
  35. sudo update-rc.d -f mountscript remove
  36.  
  37. //192.168.2.11/Videos /home/pi/NASvideos cifs username=NASUSER,password=NASPAS,iocharset=utf8,_netdev,x-systemd.automount 0 0
  38.  
  39. if ! ( ping -c 1 My_ROUTER_IP ) > /dev/null
  40.  
  41. then
  42.  
  43. echo "network is NOT up so wait"
  44.  
  45. sleep 2
  46.  
  47. else
  48.  
  49. echo "Network is UP"
  50.  
  51. sudo mount -a
  52.  
  53. break
  54.  
  55. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement