Package: pxe
Version: 1.4.2-7
Severity: normal
Tags: patch

"/etc/init.d/pxe stop" loops, waiting for pxe.pid to disappear before exiting.  
On my system /usr/sbin/pxe died for some reason, leaving around a stale
/var/run/pxe/pxe.pid.  That causes /etc/init.d/pxe to loop indefinitely.
/etc/init.d scripts that loop can have a variety of nasty side effects, like
preventing the system from shutting down cleanly and causing logrotate to fail.

A simple fix it to make the wait_no_pid() in /etc/init.d/pxe check to
see if /var/run/pxe/pxe.pid is stale, and remove it if it is.  Here is
a new version of wait_no_pid() to do that.  Replacing the existing
wait_no_pid() in /etc/init.d/pxe with this version will resolve this bug
report.


  wait_no_pid()
  {
          local pid=$(cat "${PID}" 2>/dev/null) || return 0
          local exe=$(readlink "/proc/${pid}/exe" 2>/dev/null) || :
          while [ "${exe}" = "${DAEMON}" ]
          do
                  sleep 1
                  pid=$(cat "${PID}" 2>/dev/null) || return 0
                  exe=$(readlink "/proc/${pid}/exe" 2>/dev/null) || :
          done
          rm -f "${PID}"
  }


-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pxe depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.4.5-8  GCC support library
ii  libstdc++6                    4.4.5-8    The GNU Standard C++ Library v3

Versions of packages pxe recommends:
ii  atftpd              0.7.dfsg-9.1         advanced TFTP server
ii  dhcp3-server        4.1.1-P1-15+squeeze3 ISC DHCP server (transitional pack
ii  isc-dhcp-server [dh 4.1.1-P1-15+squeeze3 ISC DHCP server for automatic IP a
ii  syslinux            2:4.02+dfsg-7        collection of boot loaders

pxe suggests no packages.

-- Configuration Files:
/etc/init.d/pxe changed [not included]

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to