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

Bug #1474971 reported by J G Miller
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xinetd (Ubuntu)
Invalid
Low
Unassigned

Bug Description

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 <email address hidden>
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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xinetd (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Changed in xinetd (Ubuntu):
importance: Undecided → Low
Revision history for this message
LtWorf (tiposchi) wrote :

Since upstart is gone, I'm closing this.

Changed in xinetd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.