Ticket #730 (closed defect: invalid)

Opened 14 years ago

Last modified 13 years ago

debathena-nsswitch-config should divert initctl to unset NSS_NONLOCAL_IGNORE

Reported by: andersk Owned by:
Priority: normal Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description

debathena-nsswitch-config should divert /sbin/initctl with a wrapper that unsets NSS_NONLOCAL_IGNORE, so that Upstart jobs started by a dpkg postinst don’t wind up inside NSS_NONLOCAL_IGNORE-land.

The same wrapper that’s used for /usr/sbin/invoke-rc.d won’t quite work because it doesn’t preserve argv[0], and

-rwxr-xr-x 1 root root   113992 2010-08-12 16:53 /sbin/initctl
lrwxrwxrwx 1 root root        7 2010-08-13 13:40 /sbin/reload -> initctl
lrwxrwxrwx 1 root root        7 2010-08-13 13:40 /sbin/restart -> initctl
lrwxrwxrwx 1 root root        7 2010-08-13 13:40 /sbin/start -> initctl
lrwxrwxrwx 1 root root        7 2010-08-13 13:40 /sbin/status -> initctl
lrwxrwxrwx 1 root root        7 2010-08-13 13:40 /sbin/stop -> initctl

but this should work:

#!/bin/bash
unset NSS_NONLOCAL_IGNORE
exec -a "$0" /sbin/initctl "$@"

Change History

comment:1 Changed 13 years ago by andersk

  • Status changed from new to closed
  • Resolution set to invalid
debathena / trac-#730 / andersk  15:03  (Anders Kaseorg)
    Hmm, I wonder what I was thinking when I filed #730.  Upstart jobs
    aren’t actually children of initctl.
Note: See TracTickets for help on using tickets.