3

I need to run sudo mount -a after boot since auto mount of the share doesn't happen as needed (/etc/fstab contains the right code for that ).

How can I do this on Jessie Pixel?

3

Write a systemd or init service that does what you want.

you can also use cron by running:

sudo crontab -e 

Then:

@reboot /my/special/script.sh

Don't forget to chmod the script (chmod 744). This should run your script once after reboot.

  • I tried 'sudo crontab -e' and 'crontab -e' , adding : @reboot mount -a both - no success. even tried : sudo mount -a again - so success – Guy . D Jun 7 '17 at 12:31
  • Any idea why isn't working?? – Guy . D Jun 8 '17 at 6:35
  • what's not working ? is the script executed ? add some logging or write to some file. – TheBrash Jun 8 '17 at 7:24
  • I did not write script but the command "mount -a" to mount shares. After boot I write in terminal the command and shares are mounted immediately – Guy . D Jun 8 '17 at 7:32
  • try something like touch /some/file let's see if that command is actually gets called; you can also check the logs or just redirect whatever mount will return to some file and see what's wrong. – TheBrash Jun 8 '17 at 7:55
0

Answered in another thread. I is all about timing

https://raspberrypi.stackexchange.com/a/33607/68038

Not the answer you're looking for? Browse other questions tagged or ask your own question.