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?

0

2 Answers 2

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.

14
  • I tried 'sudo crontab -e' and 'crontab -e' , adding : @reboot mount -a both - no success. even tried : sudo mount -a again - so success
    – guyd
    Commented Jun 7, 2017 at 12:31
  • Any idea why isn't working??
    – guyd
    Commented Jun 8, 2017 at 6:35
  • what's not working ? is the script executed ? add some logging or write to some file.
    – Tychus
    Commented Jun 8, 2017 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
    – guyd
    Commented Jun 8, 2017 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.
    – Tychus
    Commented Jun 8, 2017 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.