Run script at boot time

Nils Kassube kassube at gmx.net
Sun Nov 14 08:09:18 UTC 2010


Shahar Dag wrote:
> On Ubuntu 8.04 I want to run a script that update some files.
> 
> I want to run the script when the computer boots.
> 
> The script takes the data from a mounted file system (it’s a network
> file system).
> 
> The script is started by an entry in /etc/crontab that looks like:
> 
> @reboot   root  my_script
> 
> The problem is that the file system is not mounted when my_script is
> called.

You could change your script and make it wait for the availability of 
the data. For that purpose you could repeatedly check the output of the 
mount command or check for the existence of a path on the mounted file 
system and wait some time before you try again.


Nils




More information about the ubuntu-users mailing list