On Mon, Feb 13, 2012 at 10:42:00AM -0000, Thomas Hood wrote:
> I read in initctl(8):
> > COMMANDS
> >     start
> >         [...]
> >         IF the job is already running, start will return an error.

> Resolvconf.postinst runs

>     invoke-rc.d resolvconf start

> which does

>     /etc/init.d/resolvconf start

> which, because /etc/init.d/resolvconf is a symlink to /lib/init/upstart-
> job, does

>     start resolvconf

> Now, at the time of an upgrade to the resolvconf package from any
> earlier version of the package that started an Upstart job, the
> resolvconf Upstart job will be considered by Upstart already to be
> running.

> But since 1.63ubuntu5 the job is not stopped on upgrade.
> 
>     resolvconf (1.63ubuntu5) precise; urgency=low
>       [ Steve Langasek ]
>       * Call dh_installinit with -r, to not stop/start resolvconf on upgrade;
>         that just leaves a window when updates aren't happening, which
>         doesn't benefit us.

> Hence the failure.

$ status resolvconf
resolvconf start/running
$ sudo /etc/init.d/resolvconf start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service resolvconf start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start resolvconf
$ echo $?
0
$

Yes, the *start* command will exit non-zero if you call it when the job is
already running.  But the invoke-rc.d command will not; the upstart init
script wrapper fully implements Debian policy's requirements for init
scripts, including the requirement to not error out when starting an
already-started job.

The error message 'start: Job failed to start' indicates that the job is
stopped and cannot be started.  That's not due to the dh_installinit usage.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/929552

Title:
  Upgrade of resolvconf from 1.63ubuntu* to 1.63ubuntu7 fails trying to
  start  the resolvconf Upstart job a second time

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/929552/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to