[hipl-dev] Re: [Branch ~hipl-core/hipl/trunk] Rev 5940: Allow hipd to exit gracefully in openwrt init-script.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Thu, 09 Jun 2011 22:49:06 +0200

On Mon, May 30, 2011 at 09:38:29AM +0200, David Martin wrote:
> 
> >>  restart() {
> >>      echo -n "Restarting hipd"
> >> -    killall hipd
> >> +    # if hipd is running, give it 5 seconds to exit gracefully
> >> +    killall hipd && env sleep 5
> >
> > Why "env"?
> 
> from 'info coreutils 'sleep invocation' ':
> > Due to shell aliases and built-in `sleep' command, using an
> > unadorned `sleep' interactively or in a script may get you different
> > functionality than that described here.  Invoke it via `env' (i.e.,
> > `env sleep ...') to avoid interference from the shell.

OpenWrt does not use GNU coreutils, it uses BusyBox, so this is the
wrong manual to look in.

> To me it seemed like the correct way to call it. Now I'm not that
> certain anymore. Should I leave it out?

Unless you have a real scenario where it breaks I'm tempted to say yes.

Diego

Other related posts: