Public bug reported:

PRETTY_NAME="Ubuntu 14.04.2 LTS"
SUPPORT_URL="http://help.ubuntu.com/";
VERSION="14.04.2 LTS, Trusty Tahr"

Package: xinetd
Origin: Ubuntu
Maintainer: Ubuntu Core Developers <ubuntu-devel-disc...@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Version: 1:2.3.15-3ubuntu1

In the provided upstart configuration file /etc/init/xinetd.conf, there
is the pre-stop script

pre-stop script
  xinetd_pid=$(status | awk '/stop\/pre-stop/ { print $NF }')
  [ -n "${xinetd_pid}" ] || exit 0
  kill -QUIT "${xinetd_pid}"
end script

The status command as written will always echo the message

status: missing job name
Try `status --help' for more information.

which will go to stderr and so the variable xinetd_pid will always be
blank.

This is because the jobname parameter has been omitted from  the status
command and thus the xinetd process is never killed.

Therefore the line should read

 xinetd_pid=$(status xinetd | awk '/stop\/pre-stop/ { print $NF }')

However because xinetd is running in non-daemon mode, upstart knows the
pid of the running xinetd so successfully kills it.

Therefore the pre-stop script which is broken is  not needed regardless and 
after removing the pre-stop script and testing with
start, stop, status and checking with ps, the xinetd process is successfully 
stopped and started, demonstrating that this snippet
should be removed because it is broken and pointless.

** Affects: xinetd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to xinetd in Ubuntu.
https://bugs.launchpad.net/bugs/1474971

Title:
  missing parameter to status in upstart pre-stop script which is not
  needed regardless

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

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to