Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc /proc proc defaults 0 0
- /dev/mmcblk0p5 /boot vfat defaults 0 2
- /dev/mmcblk0p6 / ext4 defaults,noatime 0 1
- //192.168.2.11/Videos /home/pi/NASvideos cifs username=NASUSER,password=NASPAS,iocharset=utf8 0 0
- # a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that
- sudo nano /etc/init.d/mountscript
- #! /bin/sh
- # /etc/init.d/mountscript
- ### BEGIN INIT INFO
- # Provides: Mounting of all drives
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Simple script to mount drives at boot
- # Description: Added 30jan 2014
- ### END INIT INFO
- #Now mount all drives
- sudo mount -a
- echo "All drives mounted"
- sudo chmod 755 /etc/init.d/mountscript
- sudo /etc/init.d/mountscript start
- sudo update-rc.d mountscript defaults
- sudo reboot
- ls NAMEOFDRIVE
- sudo update-rc.d -f mountscript remove
- //192.168.2.11/Videos /home/pi/NASvideos cifs username=NASUSER,password=NASPAS,iocharset=utf8,_netdev,x-systemd.automount 0 0
- if ! ( ping -c 1 My_ROUTER_IP ) > /dev/null
- then
- echo "network is NOT up so wait"
- sleep 2
- else
- echo "Network is UP"
- sudo mount -a
- break
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement