Dan, In my tests here, I added 'respawn', and made the pre-stop script look like:
pre-stop script xinetd_pid=$(status | awk '/stop\/pre-stop/ { print $NF }') [ -n "${xinetd_pid}" ] || exit 0 kill -QUIT "${xinetd_pid}" wait ${xinetd_pid} stop # Prevent respawn bug in upstart (LP: #605007) end script With 'respawn' commented out, the script works like: $ sudo status xinetd xinetd start/running, process 490 $ sudo stop xinetd xinetd stop/waiting $ sudo start xinetd xinetd start/running, process 1364 With respawn added back in, it looks like: $ sudo status xinetd xinetd stop/waiting $ sudo start xinetd xinetd start/running, process 3094 $ sudo stop xinetd xinetd start/running, process 3275 $ sudo stop xinetd xinetd start/running, process 3394 So I don't think the workaround works. Initial debugging shows that nothing in that pre-stop script after 'wait' will run. I'm guessing that upstart just kills the pre-stop job after it sees that the process is gone. So, I think the right thing to do here is to move to the upstart job that I have, and, if you see fit, open a new bug saying "respawn does not work with xinetd upstart job". ** Changed in: xinetd (Ubuntu) Status: Incomplete => In Progress ** Branch unlinked: lp:~smoser/ubuntu/maverick/xinetd/xinetd.bug43574 ** Branch linked: lp:~smoser/ubuntu/natty/xinetd/bug43574 -- You received this bug notification because you are a member of Ubuntu Bugs, which is a direct subscriber. https://bugs.launchpad.net/bugs/43574 Title: Needs Ubuntu-style init script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs