[Planetlab-users] Restarting a program after reboot

Steve Muir smuir at CS.Princeton.EDU
Fri Sep 23 10:47:40 EDT 2005


a simpler method that should work is just to have crond added to the list 
of services started at 'boot' time, since we use the standard SysV startup 
mechanisms as well as rc.vinit.  the command chkconfig should do what you
want, something like:

/sbin/chkconfig crond on

since rc.vinit runs before the SysV scripts you don't need to manually 
start crond the first time this runs either.  this command is idempotent 
so you can pretty much unconditionally run it every time rc.vinit is
executed.

as for why sometimes crond isn't running, please send a list of a few 
nodes where you see this problem to support and i will look into it.

steve



On Fri, 23 Sep 2005, Alex Sherman wrote:

>
>
> Hi
>
> I want to make sure that my program starts up when a planetlab machine
> is rebooted. A while back I found a hint somewhere in the FAQ
> that recommended to modify the /etc/rc.vinit to have crond started
> at boot time. (And that runs a command in my crontab)
>
> Below is the pasted script suggested in the FAQ. However, I find that
> on some machines crond is not running. I am not sure whether this is
> a problem with the script or crond starts up and then dies for some
> unexplained reason.
>
> Any suggestions will be appreciated.
>
> -Alex
>
> my /etc/rc.vinit:
>
> #!/bin/sh
>
> case "$1" in
>    'start')
>        /etc/init.d/crond start
>        ;;
>    'stop')
>        /etc/init.d/crond stop
>        ;;
>    'restart')
>        /etc/init.d/crond restart
>        ;;
>    *)
>        echo rc.vinit was called with $1 as an argument
>        ;;
> esac
>
> /usr/bin/logger rc.vinit completed $1 at `date`
>
> _______________________________________________
> Users mailing list: Users at lists.planet-lab.org
> https://lists.planet-lab.org/mailman/listinfo/users
>



More information about the Users mailing list